@client.event
async def on_raw_reaction_add(payload):
guild = client.get_guild(id=payload.guild_id)
roles = guild.get_role(role_id)
await user.add_roles(roles)
@client.event
async def on_member_join(member):
if member.guild.name == "": # Server Name
role = member.guild.get_role()#role id here
await member.add_roles(role)
embed = discord.Embed(title=f"Member Joined", description=f"{member.mention}, Welcome to {member.guild.name}. We hope that your time with us is a happy one!", color=0x9b26b9)
embed.add_field(name=f'Please check out the Rules Channel!', value="Rules channel mention", inline=False)
embed.add_field(name="Latest announcements are made here!", value="Announcment channel mention", inline=False)
await client.get_channel(channel_id_here).send(embed=embed)
else:
return