diff options
author | 2022-08-19 10:27:12 +0100 | |
---|---|---|
committer | 2022-08-19 10:28:03 +0100 | |
commit | fabfa9074e76b5e8577b1fc068fbb02627ff9577 (patch) | |
tree | 17ce532ca82715c2bbadf0b445d761dcf15722e8 | |
parent | Allow help in DMs (diff) |
Update bookmark error handling
This moves sending the error response to within the except block, making it easier to parse what the code is doing.
-rw-r--r-- | bot/exts/utilities/bookmark.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/utilities/bookmark.py b/bot/exts/utilities/bookmark.py index 58f3044c..70175c80 100644 --- a/bot/exts/utilities/bookmark.py +++ b/bot/exts/utilities/bookmark.py @@ -74,10 +74,9 @@ class Bookmark(commands.Cog): await member.send(embed=embed) except discord.Forbidden: error_embed = self.build_error_embed(f"{member.mention}, please enable your DMs to receive the bookmark.") + await channel.send(embed=error_embed) else: log.info(f"{member} bookmarked {target_message.jump_url} with title '{title}'") - return - await channel.send(embed=error_embed) @commands.group(name="bookmark", aliases=("bm", "pin"), invoke_without_command=True) @commands.guild_only() |