Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,17 @@ api = HfApi()
|
|
50 |
async def on_ready():
|
51 |
print(f'Logged in as {bot.user.name}')
|
52 |
print(f"XP_PER_MESSAGE: {XP_PER_MESSAGE}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
|
55 |
def calculate_level(xp):
|
@@ -421,17 +432,7 @@ with demo:
|
|
421 |
print(dataframe2)
|
422 |
|
423 |
|
424 |
-
|
425 |
-
worksheet_test = gspread_bot.open("test").sheet1
|
426 |
-
#worksheet = gspread_bot.open("levelbot").sheet1
|
427 |
-
|
428 |
-
URL_test = "https://docs.google.com/spreadsheets/d/1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w/edit#gid=0"
|
429 |
-
csv_url_test = URL.replace('/edit#gid=', '/export?format=csv&gid=')
|
430 |
-
response = requests.get(csv_url)
|
431 |
-
if response.status_code == 200:
|
432 |
-
csv_content = response.text
|
433 |
-
print(csv_content)
|
434 |
-
worksheet_test.update('A1', csv_data)
|
435 |
|
436 |
|
437 |
|
|
|
50 |
async def on_ready():
|
51 |
print(f'Logged in as {bot.user.name}')
|
52 |
print(f"XP_PER_MESSAGE: {XP_PER_MESSAGE}")
|
53 |
+
# testing sheet -> read -> paste sheet
|
54 |
+
worksheet_test = gspread_bot.open("test").sheet1
|
55 |
+
#worksheet = gspread_bot.open("levelbot").sheet1
|
56 |
+
|
57 |
+
URL_test = "https://docs.google.com/spreadsheets/d/1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w/edit#gid=0"
|
58 |
+
csv_url_test = URL.replace('/edit#gid=', '/export?format=csv&gid=')
|
59 |
+
response = requests.get(csv_url)
|
60 |
+
if response.status_code == 200:
|
61 |
+
csv_content = response.text
|
62 |
+
print(csv_content)
|
63 |
+
worksheet_test.update('A1', csv_data)
|
64 |
|
65 |
|
66 |
def calculate_level(xp):
|
|
|
432 |
print(dataframe2)
|
433 |
|
434 |
|
435 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
|
437 |
|
438 |
|