Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I am using this code. If when you enter the command !avatar (! - as a prefix), without mentioning the participant, then the avatar of the user who entered the command is displayed.
@bot.command()
async def avatar(ctx, member: discord.Member = None):
if member == None:#если не упоминать участника тогда выводит аватар автора сообщения
member = ctx.author
embed = discord.Embed(color = 0x22ff00, title = f"Аватар участника - {member.name}", description = f"[Нажмите что бы скачать аватар]({member.avatar_url})")
embed.set_image(url = member.avatar_url)
await ctx.send(embed = embed)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question