diff options
author | 2021-05-11 10:46:35 +0530 | |
---|---|---|
committer | 2021-10-11 12:05:42 +0530 | |
commit | 19112affa86ceb2fbe55e0cf751ac675f24d725e (patch) | |
tree | 86180e3a845635972feaae1351f935f963852940 | |
parent | Apply requested changes to doc strings (diff) |
Use better variable names
This commit also adds a line which was got removed by mistake earlier.
-rw-r--r-- | bot/exts/moderation/incidents.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/exts/moderation/incidents.py b/bot/exts/moderation/incidents.py index 950d419c0..05c2ad6c9 100644 --- a/bot/exts/moderation/incidents.py +++ b/bot/exts/moderation/incidents.py @@ -238,6 +238,8 @@ async def extract_message_links(message: discord.Message, bot: Bot) -> t.Optiona if embed: embeds.append(embed) + return embeds + log.trace( f"Skipping discord message link detection on {message.id}: message doesn't qualify." ) @@ -567,7 +569,7 @@ class Incidents(Cog): if webhook_msg_id: await self.incidents_webhook.edit_message( message_id=webhook_msg_id, - embeds=[x for x in webhook_embed_list if x is not None], + embeds=[embed for embed in webhook_embed_list if embed is not None], ) return @@ -600,7 +602,7 @@ class Incidents(Cog): """ try: webhook_msg = await webhook.send( - embeds=[x for x in webhook_embed_list if x is not None], + embeds=[embed for embed in webhook_embed_list if embed is not None], username=sub_clyde(message.author.name), avatar_url=message.author.avatar_url, wait=True, |