Add help command read from file

dev
pocketjawa 2017-02-21 23:15:15 -05:00
parent 9a8d99cf44
commit e5469d4abe
1 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,9 @@ def on_ready():
def on_message(message): def on_message(message):
if message.content.lower().startswith('!maki'): if message.content.lower().startswith('!maki'):
yield from client.send_message(message.channel, 'http://maki.pocketjawa.com/monday.png') yield from client.send_message(message.channel, 'http://maki.pocketjawa.com/monday.png')
elif message.content.lower().startswith('!help'):
helpfile = open("/srv/discord-pocketbot/helpcommand.txt","r")
yield from client.send_message(message.channel, helpfile.read())
elif message.content.lower().startswith('!sleep'): elif message.content.lower().startswith('!sleep'):
yield from asyncio.sleep(5) yield from asyncio.sleep(5)
yield from client.send_message(message.channel, 'Done sleeping') yield from client.send_message(message.channel, 'Done sleeping')