aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Shivansh-007 <[email protected]>2021-04-16 16:49:32 +0530
committerGravatar Shivansh-007 <[email protected]>2021-10-11 12:05:33 +0530
commite8625daa99d9bbbd929d132be44164ce1254b74e (patch)
tree8d108498fc6e1c6a40c4fa016d74d1086fde21ee
parentApply grammar and style changes. (diff)
Use `DiscordException` instead of broad exception clause.
-rw-r--r--bot/exts/moderation/incidents.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/moderation/incidents.py b/bot/exts/moderation/incidents.py
index b77fdfabe..edf621e02 100644
--- a/bot/exts/moderation/incidents.py
+++ b/bot/exts/moderation/incidents.py
@@ -164,7 +164,7 @@ async def make_message_link_embed(ctx: Context, message_link: str) -> discord.Em
message_convert_object = MessageConverter()
message = await message_convert_object.convert(ctx, message_link)
- except Exception as e:
+ except discord.DiscordException as e:
embed.title = f"{e}"
embed.colour = Colours.soft_red
@@ -558,7 +558,7 @@ class Incidents(Cog):
f"Message Link Embed {x + 1}/{len(webhook_embed_list)} sent successfully."
)
- except Exception:
+ except discord.DiscordException:
log.exception(
f"Failed to send message link embeds {message.id} to #incidents."
)