fix(shard): 🐛 Extract coros from asyncio.gather for better (individual) error logging.

This commit is contained in:
2025-03-16 11:29:44 -03:00
parent 87ffc4644b
commit 4360d0b053
+6 -7
View File
@@ -239,22 +239,21 @@ class Calls(base.Cog):
) )
if blocked_section: if blocked_section:
return await asyncio.gather( await message.channel.send(
message.channel.send(
( (
"❌ Your message wasn't sent because it contained a blocked word or " "❌ Your message wasn't sent because it contained a blocked word or "
f"pattern: `{blocked_section}`" f"pattern: `{blocked_section}`"
), ),
delete_after=10, delete_after=10,
), )
self.bot.get_partial_messageable(other_channel).send( await self.bot.get_partial_messageable(other_channel).send(
( (
f"❌ **{message.author.display_name}** sent a message that was blocked.\n" f"❌ **{message.author.display_name}** sent a message that was blocked.\n"
"-# If you see an inappropiate message, please report it using `Apps > " "-# If you see an inappropiate message, please report it using `Message > "
"Report Message`." "Apps > Report Message`."
),
), ),
) )
return
message_content = self.bot.clean_message(message) message_content = self.bot.clean_message(message)