From 7d6662e6b185b243d25d8bc4e30e01c6d2444df8 Mon Sep 17 00:00:00 2001 From: zephyrkul Date: Tue, 18 Aug 2020 18:32:06 -0600 Subject: [PATCH] [customcom] properly catch TimeoutErrors --- redbot/cogs/customcom/customcom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index a94548bb8..135a3c6e5 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -164,7 +164,7 @@ class CommandObj: pred = MessagePredicate.yes_or_no(ctx) try: await self.bot.wait_for("message", check=pred, timeout=30) - except TimeoutError: + except asyncio.TimeoutError: await ctx.send(_("Response timed out, please try again later.")) return if pred.result is True: @@ -175,7 +175,7 @@ class CommandObj: resp = await self.bot.wait_for( "message", check=MessagePredicate.same_context(ctx), timeout=180 ) - except TimeoutError: + except asyncio.TimeoutError: await ctx.send(_("Response timed out, please try again later.")) return response = resp.content