fix missing arguments to send()
This commit is contained in:
parent
16ac10d49a
commit
84f53b56ae
6
bot.py
6
bot.py
@ -143,18 +143,18 @@ class IRCBot():
|
|||||||
message_body = ""
|
message_body = ""
|
||||||
if message_body:
|
if message_body:
|
||||||
if message_body.startswith("!rollcall"):
|
if message_body.startswith("!rollcall"):
|
||||||
self.send(helptext)
|
self.send(channel, helptext)
|
||||||
continue
|
continue
|
||||||
elif message_body.startswith("!chatterbot"):
|
elif message_body.startswith("!chatterbot"):
|
||||||
arguments = message_body.strip().lower()[11:]
|
arguments = message_body.strip().lower()[11:]
|
||||||
if not arguments:
|
if not arguments:
|
||||||
self.send(helptext)
|
self.send(channel, helptext)
|
||||||
continue
|
continue
|
||||||
arguments = arguments.split()
|
arguments = arguments.split()
|
||||||
for command, callback in self.commands:
|
for command, callback in self.commands:
|
||||||
if command not in arguments:
|
if command not in arguments:
|
||||||
continue
|
continue
|
||||||
self.send(callback(channel, arguments[1:]))
|
self.send(channel, callback(channel, arguments[1:]))
|
||||||
else:
|
else:
|
||||||
if channel in ("#tildetown", "#bots"):
|
if channel in ("#tildetown", "#bots"):
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user