mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-10-25 02:23:04 +00:00 
			
		
		
		
	Fix AttributeError in examples
This commit is contained in:
		| @@ -28,7 +28,7 @@ async def userinfo(ctx: commands.Context, user: discord.User): | |||||||
|     # and can do the following: |     # and can do the following: | ||||||
|     user_id = user.id |     user_id = user.id | ||||||
|     username = user.name |     username = user.name | ||||||
|     avatar = user.avatar_url |     avatar = user.avatar.url | ||||||
|     await ctx.send(f'User found: {user_id} -- {username}\n{avatar}') |     await ctx.send(f'User found: {user_id} -- {username}\n{avatar}') | ||||||
|  |  | ||||||
| @userinfo.error | @userinfo.error | ||||||
|   | |||||||
| @@ -81,7 +81,7 @@ async def emoji(ctx: commands.Context, emoji: discord.PartialEmoji, *roles: disc | |||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     # fetch the emoji asset and read it as bytes. |     # 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 |     # the key parameter here is `roles`, which controls | ||||||
|     # what roles are able to use the emoji. |     # what roles are able to use the emoji. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user