Add a stub botcmd.py

This commit is contained in:
Juhani Krekelä 2017-09-06 20:47:32 +03:00
parent 984af5b68e
commit a0b4f51fef
1 changed files with 25 additions and 0 deletions

25
botcmd.py Normal file
View File

@ -0,0 +1,25 @@
# initialize()
# Called to initialize the IRC bot
# Runs before even logger is brought up, and blocks further bringup until it's done
def initialize():
...
# handle_message(*, prefix, message, nick, channel, irc)
# Called for PRIVMSGs.
# prefix is the prefix at the start of the message, without the leading ':'
# message is the contents of the message
# nick is who sent the message
# channel is where you should send the response (note: in queries nick == channel)
# irc is the IRC API object
# All strings are bytestrings or bytearrays
def handle_message(*, prefix, message, nick, channel, irc):
...
# handle_nonmessage(*, prefix, command, arguments, irc)
# Called for all other commands than PINGs and PRIVMSGs.
# prefix is the prefix at the start of the message, without the leading ':'
# command is the command or number code
# arguments is rest of the arguments of the command, represented as a list. ':'-arguments are handled automatically
# All strings are bytestrings or bytearrays
def handle_nonmessage(*, prefix, command, arguments, irc):
...