Modified help command to give read per command help files.

dev
pocketjawa 2018-03-02 21:48:40 -05:00
parent 6784e9424f
commit 371fbe3db9
1 changed files with 10 additions and 2 deletions

View File

@ -77,8 +77,16 @@ def on_message(message):
#Posts help info
elif message.content.lower().startswith('!help'):
args = message.content.partition(' ')[2]
command = args.partition(' ')[0]
if (command is '' ):
helpfile = open(cwd + "/helpcommand.txt","r")
yield from client.send_message(message.channel, helpfile.read())
elif os.path.isfile(cwd + "/helptext/" + command):
commandhelp = open(cwd + "/helptext/" + command,"r")
yield from client.send_message(message.channel, commandhelp.read())
else:
yield from client.send_message(message.channel, 'Either that command does not exist, or it is too simple to deserve extra context <:tohrusmug:292110413129318401>')
#Sleeps for 5 seconds. Don't know why I still have this tbh
elif message.content.lower().startswith('!sleep'):