1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 21:02:38 +00:00

Added "0" in addition to "cancel" to abort wait_for

This commit is contained in:
Myned 2017-10-27 21:07:49 -04:00
parent fac0cc58f0
commit 1c212ee20d

View file

@ -510,7 +510,7 @@ class MsG:
async def _get_pool(self, ctx, *, booru='e621', query=[]):
def on_message(msg):
if msg.content.lower() == 'cancel' and msg.author is ctx.author and msg.channel is ctx.channel:
if (msg.content.isdigit() and int(msg.content) == 0) or msg.content.lower() == 'cancel' and msg.author is ctx.author and msg.channel is ctx.channel:
raise exc.Abort
elif msg.content.isdigit():
if int(msg.content) <= len(pools) and int(msg.content) > 0 and msg.author is ctx.author and msg.channel is ctx.channel: