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
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
@pvk1ngfstring
if you are going to include stuff like that. To make anfstring
just putf
in front of the string: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)