From 127b3239e9eb993f6026047cc196962246b39654 Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Tue, 27 Apr 2021 21:09:01 +0900 Subject: [PATCH] Fix AttributeError in examples --- examples/converters.py | 2 +- examples/secret.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/converters.py b/examples/converters.py index 41aba4987..9bd8ae067 100644 --- a/examples/converters.py +++ b/examples/converters.py @@ -28,7 +28,7 @@ async def userinfo(ctx: commands.Context, user: discord.User): # and can do the following: user_id = user.id username = user.name - avatar = user.avatar_url + avatar = user.avatar.url await ctx.send(f'User found: {user_id} -- {username}\n{avatar}') @userinfo.error diff --git a/examples/secret.py b/examples/secret.py index 1e90d8f55..9246c68fb 100644 --- a/examples/secret.py +++ b/examples/secret.py @@ -81,7 +81,7 @@ async def emoji(ctx: commands.Context, emoji: discord.PartialEmoji, *roles: disc """ # fetch the emoji asset and read it as bytes. - emoji_bytes = await emoji.url.read() + emoji_bytes = await emoji.read() # the key parameter here is `roles`, which controls # what roles are able to use the emoji.