lunarflu HF staff commited on
Commit
754d639
1 Parent(s): d355c0e

initialize lvl1 on join

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -261,6 +261,12 @@ async def on_member_unban(guild, unbanned_user):
261
  async def on_member_join(member):
262
  try:
263
  await asyncio.sleep(5)
 
 
 
 
 
 
264
  embed = Embed(color=Color.blue())
265
  avatar_url = member.avatar.url if member.avatar else bot.user.avatar.url
266
  embed.set_author(name=f"{member} ID: {member.id}", icon_url=avatar_url)
 
261
  async def on_member_join(member):
262
  try:
263
  await asyncio.sleep(5)
264
+ # initialize lvl1 on join
265
+ guild = bot.get_guild(879548962464493619)
266
+ lvl1 = guild.get_role(1171861537699397733)
267
+ member2 = guild.get_member(member.id)
268
+ await member2.add_roles(lvl1)
269
+
270
  embed = Embed(color=Color.blue())
271
  avatar_url = member.avatar.url if member.avatar else bot.user.avatar.url
272
  embed.set_author(name=f"{member} ID: {member.id}", icon_url=avatar_url)