I was just trying to code a welcome message for new members who join the server. I wanted to send an embed everytime a new member joins. However, the embed is not getting sent. Could someone please help me out?
This is my code:
async def on_member_join(member):
mention = member.mention
guild = member.guild
embed = discord.Embed(title="**New Member Joined!**", description=f"{mention} joined {guild}!", color = discord.Colour.purple())
embed.set_thumbnail(url=f"{member.avatar.url}")
channel = discord.utils.get(member.guild.channels, id=Channel_ID)
await channel.send(embed=embed)
Thanks!