Skip to content

Commit 35da924

Browse files
committed
hotfix: make sure only processed messages are stripped of embeds
1 parent fd57375 commit 35da924

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cogs/backend/handle/events/_event_tools.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ async def handle_codeblock_message(ctx: GitBotContext) -> Optional[discord.Messa
7070
@commands.cooldown(3, 20, commands.BucketType.guild)
7171
@commands.max_concurrency(10, wait=True)
7272
async def resolve_url_command(ctx: GitBotContext) -> Optional[discord.Message]:
73-
try:
74-
if (await ctx.bot.db.guilds.get_autoconv_config(ctx)).get('gh_url') and (cmd_data := await ctx.bot.mgr.get_link_reference(ctx)):
73+
if (await ctx.bot.db.guilds.get_autoconv_config(ctx)).get('gh_url') and (cmd_data := await ctx.bot.mgr.get_link_reference(ctx)):
74+
try:
7575
ctx.bot.logger.debug('Invoking command(s) "%s" with kwargs: %s', str(cmd_data.command), str(cmd_data.kwargs))
7676
ctx.__autoinvoked__ = True
7777
if isinstance(cmd_data.command, commands.Command):
@@ -92,9 +92,10 @@ async def resolve_url_command(ctx: GitBotContext) -> Optional[discord.Message]:
9292
continue
9393
except Exception: # noqa - we really don't care
9494
continue
95-
finally:
96-
if ctx.bot_permissions.manage_messages:
97-
await ctx.message.edit(suppress=True)
95+
finally:
96+
if ctx.bot_permissions.manage_messages:
97+
await ctx.message.edit(suppress=True)
98+
9899

99100

100101
@silence_errors

0 commit comments

Comments
 (0)