Welcome Discord Bot Python
Hello there! I'm trying to code a bot that sends welcome embed when a member joins the server, but i'm having trouble figuring out the coding for it. If anyone could help that would be great!
P.S Im trying to achieve a likewise welcome messages as that of carl bot if that makes sense :)
I might be able to help.
I think you just need an
on_join
event, something like this:Or something like that
@InvisibleOne Thank you! But what im trying to do is have an embed send instead of a message like this but i dont think my coding is correct
@client.event
async def on_join(member):
guild = bot.get_guild(836304285545398272)
channel = client.get_channel(843182724255580201)
embed=discord.Embed(title="Welcome To Tryhards", description="Hello {user(proper)} To The 'Name' Server. Please Read the Rules in #𝐑𝐮𝐥𝐞𝐬 , and Grab Some Roles in #𝐑𝐨𝐥𝐞𝐬 .")
embed.set_thumbnail(url='https://media.discordapp.net/attachments/762023030830399529/862102999782129694/image0.gif')
embed.set_footer(text="Made by Sawyer")
await channel.send(embed=embed)
It's looks ok, but for your description it needs to be an
fstring
if you are going to include stuff like that. To make anfstring
just putf
in front of the string:@pvk1ng
@InvisibleOne For some reason nothing is sending when a member joins and this is the code im running
@client.event
async def on_join(member):
guild = bot.get_guild(836304285545398272)
channel = client.get_channel(843182724255580201)
embed=discord.Embed(title="Welcome To Tryhards", description="Hello {user(proper)} To The 'Name' Server. Please Read the Rules in #𝐑𝐮𝐥𝐞𝐬 , and Grab Some Roles in #𝐑𝐨𝐥𝐞𝐬 .")
embed.set_thumbnail(url='https://media.discordapp.net/attachments/762023030830399529/862102999782129694/image0.gif')
embed.set_footer(text="Made by Sawyer")
await channel.send(embed=embed)