Compare commits
2 commits
ee73b777ba
...
96ba34f17b
Author | SHA1 | Date | |
---|---|---|---|
96ba34f17b | |||
b283f66bb8 |
1 changed files with 6 additions and 20 deletions
24
bot.py
24
bot.py
|
@ -145,25 +145,11 @@ async def help_message(room, message):
|
||||||
@bot.listener.on_message_event
|
@bot.listener.on_message_event
|
||||||
async def help_message(room, message):
|
async def help_message(room, message):
|
||||||
match = botLibrary.MessageMatch(room, message, bot, PREFIX)
|
match = botLibrary.MessageMatch(room, message, bot, PREFIX)
|
||||||
if not (match.is_not_from_this_bot() and match.prefix() and match.is_from_userid(admin)
|
if match.is_not_from_this_bot() and match.prefix() and match.command("die"):
|
||||||
and match.command("die")):
|
if match.is_from_userid(admin):
|
||||||
return
|
await bot.api.send_text_message(room.room_id, "Ok")
|
||||||
|
|
||||||
message = ("Ok")
|
|
||||||
|
|
||||||
await bot.api.send_text_message(room.room_id, message)
|
|
||||||
exit(0)
|
exit(0)
|
||||||
|
else:
|
||||||
# We should find a better way to do this.
|
await bot.api.send_text_message(room.room_id, "You don't have permissions for that.")
|
||||||
@bot.listener.on_message_event
|
|
||||||
async def help_message(room, message):
|
|
||||||
match = botLibrary.MessageMatch(room, message, bot, PREFIX)
|
|
||||||
if not (match.is_not_from_this_bot() and match.prefix() and not match.is_from_userid(admin)
|
|
||||||
and match.command("die")):
|
|
||||||
return
|
|
||||||
|
|
||||||
message = ("You don't have permissions for that.")
|
|
||||||
|
|
||||||
await bot.api.send_text_message(room.room_id, message)
|
|
||||||
|
|
||||||
bot.run()
|
bot.run()
|
||||||
|
|
Loading…
Add table
Reference in a new issue