I’d like to add the “custom” image for new discord users in my server. Just like this: Click here for the image.
This is what I have for now:
JavaScript
x
13
13
1
@client.event
2
async def on_member_join(member):
3
4
#setting embed
5
em = discord.Embed(color=0x12d600, description=f"Thank you {member.mention}, you're the member number {len(list(member.guild.members))}!")
6
em.set_footer(text=f"{member.guild}", icon_url=f"{member.guild.icon_url}")
7
em.set_image(url=f"{member.avatar_url}")
8
em.timestamp = datetime.datetime.utcnow()
9
10
channel = client.get_channel(797807634408275998)
11
await channel.send(embed=em)
12
13
Advertisement
Answer
You need to use an image processing/manipulation library called pillow aka PIL. You’d have your default/template image, as you provided (without the user specific text). You’d then find the position as to where to write the user specific text.
I found this youtube tutorial, which actually shows how you could possibly implement it into a bot. https://www.youtube.com/watch?v=47CPq5NmhAQ