diff options
Diffstat (limited to 'bot/seasons')
| -rw-r--r-- | bot/seasons/evergreen/bookmark.py | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/bot/seasons/evergreen/bookmark.py b/bot/seasons/evergreen/bookmark.py index 0197f9f4..3fe1d12c 100644 --- a/bot/seasons/evergreen/bookmark.py +++ b/bot/seasons/evergreen/bookmark.py @@ -25,6 +25,18 @@ class Bookmark(commands.Cog):      ) -> None:
          """Send the author a link to `target_message` via DMs."""
          log.info(f"{ctx.author} bookmarked {target_message.jump_url} with title '{title}'")
 +        permissions = ctx.author.permissions_in(target_message.channel)
 +        if not permissions.read_messages:
 +            embed = discord.Embed(
 +                title=random.choice(ERROR_REPLIES),
 +                color=Colours.soft_red,
 +                description="You don't have permission to see what's in the channel so you can't "
 +                            "bookmark a message from it."
 +            )
 +            embed.set_author(name=ctx.author.name, icon_url=ctx.author.avatar_url)
 +            await ctx.send(embed=embed)
 +            return
 +
          embed = discord.Embed(
              title=title,
              colour=Colours.soft_green,
 | 
