Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
switched positions of await member.remove_roles(lvls[old_level]) print(f"Removed {lvls[old_level]} from {member}") await member.add_roles(current_role) print(f"Level Up! Gave {member} {current_role}")
Browse files
app.py
CHANGED
@@ -392,11 +392,13 @@ async def add_exp(member_id):
|
|
392 |
# increment the old level value (better to replace outright)
|
393 |
# only increment level column if you are lvl2 or 3+ with verified role (this may make some members not appear)
|
394 |
global_df.loc[index, 'discord_level'] = current_level # do not change column name
|
395 |
-
|
|
|
|
|
|
|
396 |
await member.add_roles(current_role)
|
397 |
print(f"Level Up! Gave {member} {current_role}")
|
398 |
-
|
399 |
-
print(f"Removed {lvls[old_level]} from {member}")
|
400 |
#print(f"{member} Level up! {old_level} -> {current_level}!")
|
401 |
if current_role in member.roles: # needs update; reference exp reward for verification
|
402 |
#await member.send(f"Level up! {old_level} -> {current_level}!")
|
|
|
392 |
# increment the old level value (better to replace outright)
|
393 |
# only increment level column if you are lvl2 or 3+ with verified role (this may make some members not appear)
|
394 |
global_df.loc[index, 'discord_level'] = current_level # do not change column name
|
395 |
+
|
396 |
+
|
397 |
+
await member.remove_roles(lvls[old_level])
|
398 |
+
print(f"Removed {lvls[old_level]} from {member}")
|
399 |
await member.add_roles(current_role)
|
400 |
print(f"Level Up! Gave {member} {current_role}")
|
401 |
+
|
|
|
402 |
#print(f"{member} Level up! {old_level} -> {current_level}!")
|
403 |
if current_role in member.roles: # needs update; reference exp reward for verification
|
404 |
#await member.send(f"Level up! {old_level} -> {current_level}!")
|