#Banner command.
1 messages · Page 1 of 1 (latest)
you need to fetch the user to get banner
I know
lmfao
we know this is discord.py code
Someone told me the same thing but it didn't work
probably because it was not right
cuz ive never done something like that
lol
So yeah i need to learn how to fetch users i guess
-d commands.Bot.fetch_user
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/ext/commands/api/bots.html#disnake.ext.commands.Bot.get_user "disnake.ext.commands.Bot.get_user") instead.
@commands.command(name="banner")
async def banner(self, ctx, member: discord.Member = None):
if not member:
member = ctx.author
elif isinstance(member, int):
user = await self.bot.fetch_user(member.id)
if not member:
embed = discord.Embed(description="User not found.")
return await ctx.send(embed=embed)
banner = user.banner```
is this enough or