aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar Robin5605 <[email protected]>2023-07-09 18:42:11 -0500
committerGravatar Robin5605 <[email protected]>2023-07-09 18:42:11 -0500
commit9a9528b831ede7bae4ad311717c6b02ebf2ad8b9 (patch)
tree8e278113994c748eaf2f148fd15821dcf77658c8 /bot
parentFix bug where command registers success even with DMs disabled (diff)
Fix incorrect permissions target
Diffstat (limited to 'bot')
-rw-r--r--bot/exts/utilities/bookmark.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/utilities/bookmark.py b/bot/exts/utilities/bookmark.py
index f6bd47cc..22801d14 100644
--- a/bot/exts/utilities/bookmark.py
+++ b/bot/exts/utilities/bookmark.py
@@ -199,9 +199,9 @@ class Bookmark(commands.Cog):
if target_message is None:
raise commands.UserInputError(MESSAGE_NOT_FOUND_ERROR)
- permissions = ctx.channel.permissions_for(ctx.author)
+ permissions = target_message.channel.permissions_for(ctx.author)
if not permissions.read_messages:
- log.info(f"{ctx.author} tried to bookmark a message in #{ctx.channel} but has no permissions.")
+ log.info(f"{ctx.author} tried to bookmark a message in #{target_message.channel} but has no permissions.")
embed = self.build_error_embed("You don't have permission to view this channel.")
await ctx.send(embed=embed)
return