From 7d66263948dc94c9a00ec1e48173a76d62b186c0 Mon Sep 17 00:00:00 2001 From: zephyrkul Date: Tue, 18 Aug 2020 18:40:32 -0600 Subject: [PATCH] [cc] don't send success on failure --- redbot/cogs/customcom/customcom.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index 135a3c6e5..1584ec000 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -39,6 +39,10 @@ class OnCooldown(CCError): pass +class CommandNotEdited(CCError): + pass + + class CommandObj: def __init__(self, **kwargs): self.config = kwargs.get("config") @@ -166,7 +170,7 @@ class CommandObj: await self.bot.wait_for("message", check=pred, timeout=30) except asyncio.TimeoutError: await ctx.send(_("Response timed out, please try again later.")) - return + raise CommandNotEdited() if pred.result is True: response = await self.get_responses(ctx=ctx) else: @@ -177,7 +181,7 @@ class CommandObj: ) except asyncio.TimeoutError: await ctx.send(_("Response timed out, please try again later.")) - return + raise CommandNotEdited() response = resp.content if response: @@ -448,6 +452,8 @@ class CustomCommands(commands.Cog): ) except ArgParseError as e: await ctx.send(e.args[0]) + except CommandNotEdited: + pass @customcom.command(name="list") @checks.bot_has_permissions(add_reactions=True)