From 1c212ee20de54900d25b41bdc4ca0fcd69a5d7cc Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 27 Oct 2017 21:07:49 -0400 Subject: [PATCH] Added "0" in addition to "cancel" to abort wait_for --- src/main/cogs/booru.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/cogs/booru.py b/src/main/cogs/booru.py index 73be5c7..21e2136 100644 --- a/src/main/cogs/booru.py +++ b/src/main/cogs/booru.py @@ -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: