lunarflu HF staff commited on
Commit
d3bb60f
1 Parent(s): 66e82df

if current_role in member.roles: await member.send(f"Level up! {current_level-1} -> {current_level}!")

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -213,11 +213,12 @@ async def add_exp(member_id):
213
  current_role = lvls[current_level]
214
  if current_role not in member.roles:
215
  await member.add_roles(current_role)
216
- print(f"Gave {member} {current_role}")
217
  await member.remove_roles(lvls[current_level-1])
218
  print(f"Removed {lvls[current_level-1]} from {member}")
219
  #print(f"{member} Level up! {current_level-1} -> {current_level}!")
220
- await member.send(f"Level up! {current_level-1} -> {current_level}!")
 
221
 
222
  except Exception as e:
223
  print(f"add_exp Error: {e}")
 
213
  current_role = lvls[current_level]
214
  if current_role not in member.roles:
215
  await member.add_roles(current_role)
216
+ print(f"Giving {member} {current_role}")
217
  await member.remove_roles(lvls[current_level-1])
218
  print(f"Removed {lvls[current_level-1]} from {member}")
219
  #print(f"{member} Level up! {current_level-1} -> {current_level}!")
220
+ if current_role in member.roles:
221
+ await member.send(f"Level up! {current_level-1} -> {current_level}!")
222
 
223
  except Exception as e:
224
  print(f"add_exp Error: {e}")