A
A
a-z_A-z2022-03-30 18:47:11
Python
a-z_A-z, 2022-03-30 18:47:11

How to add a thumbnail in an embed with the avatar of the person who logged into the discord.py server?

@client.event
async def on_member_join(member):
    guild = client.get_guild(не буду палить id)
    channel = guild.get_channel(не буду палит id)
    embed = discord.Embed(title="Добро пожаловать!", description=f"На наш сервер залетел {member.mention}!", color=0xCC974F)
    await channel.send(embed=embed)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
retUrn3d, 2022-03-30
@a-z_A-z

@client.event
async def on_member_join(member):
    guild = client.get_guild(321321321)
    channel = guild.get_channel(123123123)
    embed = discord.Embed(title="Добро пожаловать!", description=f"На наш сервер залетел {member.mention}!",
                          color=0xCC974F)
    embed.set_thumbnail(url=member.avatar_url)
    await channel.send(embed=embed)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question