Fix exception on empty message
This commit is contained in:
parent
eccf4ddf7a
commit
b34a73cea6
2 changed files with 4 additions and 3 deletions
4
bot.py
4
bot.py
|
@ -415,11 +415,11 @@ class Bot:
|
|||
return self.treat_prvmsg_ask(msg, srv)
|
||||
|
||||
# Owner commands
|
||||
elif msg.content[0] == '`' and msg.nick == srv.owner:
|
||||
elif len(msg.content) > 0 and msg.content[0] == '`' and msg.nick == srv.owner:
|
||||
#TODO: owner commands
|
||||
pass
|
||||
|
||||
elif msg.content[0] == '!' and len(msg.content) > 1:
|
||||
elif len(msg.content) > 0 and msg.content[0] == '!' and len(msg.content) > 1:
|
||||
# Remove the !
|
||||
msg.cmds[0] = msg.cmds[0][1:]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue