From 321b75228893ac543beec4ec5d7301557162e1a4 Mon Sep 17 00:00:00 2001 From: ericthelemur Date: Mon, 23 Mar 2026 23:49:04 +0000 Subject: [PATCH] =?UTF-8?q?Remove=20error=20message=20if=20multiple=20?= =?UTF-8?q?=F0=9F=92=AC=20reacts=20to=20quote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cogs/commands/quotes.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cogs/commands/quotes.py b/cogs/commands/quotes.py index 5efa8aa4..b54b2b81 100644 --- a/cogs/commands/quotes.py +++ b/cogs/commands/quotes.py @@ -390,7 +390,7 @@ async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent): quoted_message = await channel.fetch_message(payload.message_id) await self.quote_discord_user( - payload.member.mention, quoted_message, quoted_message + payload.member.mention, quoted_message, quoted_message, True ) async def quote_discord_user( @@ -398,6 +398,7 @@ async def quote_discord_user( requester: discord.Member, quoted_message: discord.Message, reply_to: discord.Message, + from_react = False ): """Modified version of original quote add, has more context and creates mention""" # Get mention for DB. Modified from MentionConverter @@ -425,8 +426,10 @@ async def quote_discord_user( result += "Quote already exists." else: result += MYSTERY_ERROR - - await reply_to.reply(result, mention_author=False) + + # Skip multiple clicks of quote react + if not (from_react and "Quote already exists." in result): + await reply_to.reply(result, mention_author=False) @quote.command() async def delete(self, ctx: Context, query: QuoteIDConverter):