Modified help command to give read per command help files.
parent
6784e9424f
commit
371fbe3db9
|
@ -77,8 +77,16 @@ def on_message(message):
|
||||||
|
|
||||||
#Posts help info
|
#Posts help info
|
||||||
elif message.content.lower().startswith('!help'):
|
elif message.content.lower().startswith('!help'):
|
||||||
|
args = message.content.partition(' ')[2]
|
||||||
|
command = args.partition(' ')[0]
|
||||||
|
if (command is '' ):
|
||||||
helpfile = open(cwd + "/helpcommand.txt","r")
|
helpfile = open(cwd + "/helpcommand.txt","r")
|
||||||
yield from client.send_message(message.channel, helpfile.read())
|
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
|
#Sleeps for 5 seconds. Don't know why I still have this tbh
|
||||||
elif message.content.lower().startswith('!sleep'):
|
elif message.content.lower().startswith('!sleep'):
|
||||||
|
|
Loading…
Reference in New Issue