Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
worksheet.format(f"A1:A{len(global_df.index)}", { "numberFormat": { "type": TEXT, }, })
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ async def on_ready():
|
|
64 |
|
65 |
data['discord_user_id'] = data['discord_user_id'].astype(str)
|
66 |
global_df = data
|
67 |
-
print(f"csv successfully retrieved: {global_df}")
|
68 |
#data.to_csv(csv_file, index=False)
|
69 |
|
70 |
|
@@ -75,7 +75,12 @@ def update_google_sheet():
|
|
75 |
worksheet = gspread_bot.open(name).sheet1
|
76 |
global_df['discord_user_id'] = global_df['discord_user_id'].astype(str)
|
77 |
set_with_dataframe(worksheet, global_df)
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
"""
|
81 |
scheduler = BackgroundScheduler()
|
@@ -229,8 +234,8 @@ async def add_exp(member_id):
|
|
229 |
print(f"Gave {member} {lvl1}") # can log this better
|
230 |
print(f"----------------------------------------------------")
|
231 |
|
232 |
-
|
233 |
-
|
234 |
except Exception as e:
|
235 |
print(f"add_exp Error: {e}")
|
236 |
|
|
|
64 |
|
65 |
data['discord_user_id'] = data['discord_user_id'].astype(str)
|
66 |
global_df = data
|
67 |
+
print(f"csv successfully retrieved: \n {global_df}")
|
68 |
#data.to_csv(csv_file, index=False)
|
69 |
|
70 |
|
|
|
75 |
worksheet = gspread_bot.open(name).sheet1
|
76 |
global_df['discord_user_id'] = global_df['discord_user_id'].astype(str)
|
77 |
set_with_dataframe(worksheet, global_df)
|
78 |
+
worksheet.format(f"A1:A{len(global_df.index)}", {
|
79 |
+
"numberFormat": {
|
80 |
+
"type": TEXT,
|
81 |
+
},
|
82 |
+
})
|
83 |
+
print({f"Google sheet {name} successfully updated! \n {global_df}"})
|
84 |
|
85 |
"""
|
86 |
scheduler = BackgroundScheduler()
|
|
|
234 |
print(f"Gave {member} {lvl1}") # can log this better
|
235 |
print(f"----------------------------------------------------")
|
236 |
|
237 |
+
if member_id == 811235357663297546:
|
238 |
+
update_google_sheet()
|
239 |
except Exception as e:
|
240 |
print(f"add_exp Error: {e}")
|
241 |
|