From e5469d4abe3fa83be3b129f70ab2761f60e0bf15 Mon Sep 17 00:00:00 2001 From: pocketjawa Date: Tue, 21 Feb 2017 23:15:15 -0500 Subject: [PATCH] Add help command read from file --- pocketbot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pocketbot.py b/pocketbot.py index 0bea002..1ec0716 100644 --- a/pocketbot.py +++ b/pocketbot.py @@ -27,6 +27,9 @@ def on_ready(): def on_message(message): if message.content.lower().startswith('!maki'): 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'): yield from asyncio.sleep(5) yield from client.send_message(message.channel, 'Done sleeping')