Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -259,15 +259,19 @@ async def restore_exp(ctx):
|
|
| 259 |
level = calculate_level(xp+1)
|
| 260 |
user = await bot.fetch_user(member_id)
|
| 261 |
# get column name / data to safetycheck
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
worksheet.
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
|
|
|
|
|
|
| 268 |
|
| 269 |
|
| 270 |
|
|
|
|
|
|
|
| 271 |
|
| 272 |
except Exception as e:
|
| 273 |
print(f"Error: {e}")
|
|
|
|
| 259 |
level = calculate_level(xp+1)
|
| 260 |
user = await bot.fetch_user(member_id)
|
| 261 |
# get column name / data to safetycheck
|
| 262 |
+
|
| 263 |
+
# does a record already exist?
|
| 264 |
+
cell = worksheet.find(member_id)
|
| 265 |
+
# if so, update that row...
|
| 266 |
+
|
| 267 |
+
# if not, create new record
|
| 268 |
+
length = len(worksheet.col_values('A'))
|
| 269 |
+
print(length)
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
+
|
| 274 |
+
|
| 275 |
|
| 276 |
except Exception as e:
|
| 277 |
print(f"Error: {e}")
|