fix(shard): 🐛 Extract coros from asyncio.gather for better (individual) error logging.
This commit is contained in:
+13
-14
@@ -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,
|
|
||||||
),
|
),
|
||||||
self.bot.get_partial_messageable(other_channel).send(
|
delete_after=10,
|
||||||
(
|
)
|
||||||
f"❌ **{message.author.display_name}** sent a message that was blocked.\n"
|
await self.bot.get_partial_messageable(other_channel).send(
|
||||||
"-# If you see an inappropiate message, please report it using `Apps > "
|
(
|
||||||
"Report Message`."
|
f"❌ **{message.author.display_name}** sent a message that was blocked.\n"
|
||||||
),
|
"-# If you see an inappropiate message, please report it using `Message > "
|
||||||
|
"Apps > Report Message`."
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
return
|
||||||
|
|
||||||
message_content = self.bot.clean_message(message)
|
message_content = self.bot.clean_message(message)
|
||||||
|
|
||||||
@@ -462,7 +461,7 @@ class Calls(base.Cog):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
await webhook.delete_message(propagation_id)
|
await webhook.delete_message(propagation_id)
|
||||||
|
|
||||||
except discord.errors.NotFound:
|
except discord.errors.NotFound:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user