From b1251692253f392d71bc0125ccbf9fc47e05b8e8 Mon Sep 17 00:00:00 2001 From: cgarz <20268068+cgarz@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:37:46 +0000 Subject: [PATCH] Update .avatar_url to .display_avatar --- robocop_ng/cogs/basic.py | 2 +- robocop_ng/cogs/logs.py | 4 ++-- robocop_ng/cogs/mod_userlog.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/robocop_ng/cogs/basic.py b/robocop_ng/cogs/basic.py index 78b2da94..f24e0f5d 100644 --- a/robocop_ng/cogs/basic.py +++ b/robocop_ng/cogs/basic.py @@ -40,7 +40,7 @@ async def robocop(self, ctx): title="Robocop-NG", url=config.source_url, description=config.embed_desc ) - embed.set_thumbnail(url=self.bot.user.avatar_url) + embed.set_thumbnail(url=self.bot.user.display_avatar) await ctx.send(embed=embed) diff --git a/robocop_ng/cogs/logs.py b/robocop_ng/cogs/logs.py index efeb0242..7893acc5 100644 --- a/robocop_ng/cogs/logs.py +++ b/robocop_ng/cogs/logs.py @@ -138,7 +138,7 @@ async def on_member_join(self, member): embed = discord.Embed( color=discord.Color.dark_red(), title=f"Warns for {escaped_name}" ) - embed.set_thumbnail(url=member.avatar_url) + embed.set_thumbnail(url=member.display_avatar) for idx, warn in enumerate(warns[str(member.id)]["warns"]): embed.add_field( name=f"{idx + 1}: {warn['timestamp']}", @@ -188,7 +188,7 @@ async def do_spy(self, message): # Show a message embed embed = discord.Embed(description=regd) embed.set_author( - name=message.author.display_name, icon_url=message.author.avatar_url + name=message.author.display_name, icon_url=message.author.display_avatar ) await spy_channel.send(msg, embed=embed) diff --git a/robocop_ng/cogs/mod_userlog.py b/robocop_ng/cogs/mod_userlog.py index 9a8ea612..57817c59 100644 --- a/robocop_ng/cogs/mod_userlog.py +++ b/robocop_ng/cogs/mod_userlog.py @@ -233,7 +233,7 @@ async def userinfo(self, ctx, *, user: discord.Member): await ctx.send( f"user = {user_name}\n" f"id = {user.id}\n" - f"avatar = {user.avatar_url}\n" + f"avatar = {user.display_avatar}\n" f"bot = {user.bot}\n" f"created_at = {user.created_at}\n" f"display_name = {display_name}\n"