Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -97,11 +97,14 @@ async def on_message(message):
|
|
97 |
# update exp, can only be in a positive direction
|
98 |
# read
|
99 |
xp = worksheet.cell(cell.row, cell.col+2).value
|
|
|
100 |
xp += XP_PER_MESSAGE
|
|
|
101 |
current_level = calculate_level(xp)
|
|
|
102 |
# write with added xp
|
103 |
worksheet.update(values=[[xp, current_level]], range_name=f'C{cell.row}:D{cell.row}')
|
104 |
-
|
105 |
if current_level == 2:
|
106 |
if lvl2 not in message.author.roles:
|
107 |
await message.author.add_roles(lvl2)
|
|
|
97 |
# update exp, can only be in a positive direction
|
98 |
# read
|
99 |
xp = worksheet.cell(cell.row, cell.col+2).value
|
100 |
+
print("debug")
|
101 |
xp += XP_PER_MESSAGE
|
102 |
+
print("debug")
|
103 |
current_level = calculate_level(xp)
|
104 |
+
print("debug")
|
105 |
# write with added xp
|
106 |
worksheet.update(values=[[xp, current_level]], range_name=f'C{cell.row}:D{cell.row}')
|
107 |
+
print("debug")
|
108 |
if current_level == 2:
|
109 |
if lvl2 not in message.author.roles:
|
110 |
await message.author.add_roles(lvl2)
|