diff options
Diffstat (limited to 'bot/exts/evergreen/bookmark.py')
| -rw-r--r-- | bot/exts/evergreen/bookmark.py | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/evergreen/bookmark.py b/bot/exts/evergreen/bookmark.py index f93371a6..a91ef1c0 100644 --- a/bot/exts/evergreen/bookmark.py +++ b/bot/exts/evergreen/bookmark.py @@ -1,7 +1,7 @@  import asyncio  import logging  import random -import typing as t +from typing import Optional  import discord  from discord.ext import commands @@ -37,7 +37,7 @@ class Bookmark(commands.Cog):              name="Wanna give it a visit?",              value=f"[Visit original message]({target_message.jump_url})"          ) -        embed.set_author(name=target_message.author, icon_url=target_message.author.avatar_url) +        embed.set_author(name=target_message.author, icon_url=target_message.author.display_avatar.url)          embed.set_thumbnail(url=Icons.bookmark)          return embed @@ -92,7 +92,7 @@ class Bookmark(commands.Cog):      async def bookmark(          self,          ctx: commands.Context, -        target_message: t.Optional[WrappedMessageConverter], +        target_message: Optional[WrappedMessageConverter],          *,          title: str = "Bookmark"      ) -> None: @@ -103,7 +103,7 @@ class Bookmark(commands.Cog):              target_message = ctx.message.reference.resolved          # Prevent users from bookmarking a message in a channel they don't have access to -        permissions = ctx.author.permissions_in(target_message.channel) +        permissions = target_message.channel.permissions_for(ctx.author)          if not permissions.read_messages:              log.info(f"{ctx.author} tried to bookmark a message in #{target_message.channel} but has no permissions.")              embed = discord.Embed(  |