Merged in purge_hotfix (pull request #15)

Hotfix for Purge

Approved-by: Luke Robles <lukelrobles@gmail.com>
This commit is contained in:
Kyler E Juresic 2017-08-09 20:43:59 +00:00
commit cedccc050f

View File

@ -169,7 +169,7 @@ async def on_message(message):
except ValueError: except ValueError:
# If they dont enter a number, show them an error and return out of the function # If they dont enter a number, show them an error and return out of the function
await client.send_message(message.channel, "You need to give me a number, you entered {}".format(message.content.split()[1])) await client.send_message(message.channel, "You need to give me a number, you entered {}".format(message.content.split()[1]))
return return
await client.purge_from(message.channel, limit=num, check=is_me) await client.purge_from(message.channel, limit=num, check=is_me)
# await client.send_message(message.channel, 'Deleted {} message(s)'.format(len(deleted))) # await client.send_message(message.channel, 'Deleted {} message(s)'.format(len(deleted)))