From 75ebad8f7eee8ffb9e4c46ba0abeb53efbf6a4be Mon Sep 17 00:00:00 2001 From: Kamal Curi Date: Thu, 18 Aug 2022 23:19:05 -0300 Subject: [PATCH] CHANGE: Quote errors are more verbose --- utils/commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/commands.py b/utils/commands.py index dbe5a57..c97c079 100644 --- a/utils/commands.py +++ b/utils/commands.py @@ -31,6 +31,8 @@ async def quote(bot: object, *quote: str) -> str: user = bot.author.name set_quote(user, quote) except Exception as ex: + if ex.args[0].find("Duplicate") != -1: + return await bot.send("There's already a quote from that same person, with that exact match!") return await bot.send(f'{ex.args}\n_What the fuck are you doing?_') else: return await bot.send('Done:\n`%s`' % quote)