Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Synced repo using 'sync_with_huggingface' Github Action
Browse files
app.py
CHANGED
|
@@ -85,13 +85,14 @@ async def on_message(message):
|
|
| 85 |
cell = worksheet.find(str(message.author.id))
|
| 86 |
length = len(worksheet.col_values(1))
|
| 87 |
if cell is None:
|
| 88 |
-
print(f"creating new record for {
|
| 89 |
# if not, create new record
|
|
|
|
| 90 |
xp = 10
|
| 91 |
-
worksheet.update(values=[[string_member_id,
|
| 92 |
else:
|
| 93 |
if cell:
|
| 94 |
-
print(f"updating record for {
|
| 95 |
# if so, update that row...
|
| 96 |
# update exp, can only be in a positive direction
|
| 97 |
# read
|
|
|
|
| 85 |
cell = worksheet.find(str(message.author.id))
|
| 86 |
length = len(worksheet.col_values(1))
|
| 87 |
if cell is None:
|
| 88 |
+
print(f"creating new record for {message.author}")
|
| 89 |
# if not, create new record
|
| 90 |
+
string_member_id = str(message.author.id)
|
| 91 |
xp = 10
|
| 92 |
+
worksheet.update(values=[[string_member_id, message.author.name, xp, level]], range_name=f'A{length+1}:D{length+1}')
|
| 93 |
else:
|
| 94 |
if cell:
|
| 95 |
+
print(f"updating record for {message.author}")
|
| 96 |
# if so, update that row...
|
| 97 |
# update exp, can only be in a positive direction
|
| 98 |
# read
|