#member.banner.url

1 messages · Page 1 of 1 (latest)

shy shale
#

hello, I want to display information about the user with the banner attached to the embed (picture 2), but if I remove the if member.banner check in my code (picture 1), I always get an error: "'NoneType' object has no attribute 'url'"

obsidian summit
#

yeah because if they dont have banner

#

then a banner.url wouldn't exst

shy shale
tulip skiff
#

-d disnake.Client.fetch_user

valid pineBOT
#

await fetch_user(user_id, /)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Retrieves a [`User`](https://docs.disnake.dev/en/latest/api/users.html#disnake.User "disnake.User") based on their ID. You do not have to share any guilds with the user to get this information, however many operations do require that you do.

Note

This method is an API call. If you have [`disnake.Intents.members`](https://docs.disnake.dev/en/latest/api/clients.html#disnake.Intents.members "disnake.Intents.members") and member cache enabled, consider [`get_user()`](https://docs.disnake.dev/en/latest/api/clients.html#disnake.Client.get_user "disnake.Client.get_user") instead.
tulip skiff
#

-d disnake.User.banner

valid pineBOT
#

property banner```
Returns the user’s banner asset, if available.

New in version 2.0.

Note

This information is only available via [`Client.fetch_user()`](https://docs.disnake.dev/en/latest/api/clients.html#disnake.Client.fetch_user "disnake.Client.fetch_user").
tulip skiff
#

Oh, also you can make questions in disnake RU. Link to us in #info

shy shale
#

ty!

tulip skiff
# valid pine

Banner is an disnake.Asset object if the banner exists else None