Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,8 +25,8 @@ DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
|
| 25 |
intents = discord.Intents.all()
|
| 26 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
| 27 |
|
| 28 |
-
logger = logging.getLogger(__name__)
|
| 29 |
-
logging.basicConfig(level=logging.DEBUG)
|
| 30 |
|
| 31 |
|
| 32 |
""""""
|
|
@@ -56,22 +56,20 @@ async def on_ready():
|
|
| 56 |
|
| 57 |
URL_test = "https://docs.google.com/spreadsheets/d/1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w/edit#gid=0"
|
| 58 |
csv_url_test = URL_test.replace('/edit#gid=', '/export?format=csv&gid=')
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
writer = csv.writer(file)
|
| 66 |
-
for row in csv_content:
|
| 67 |
-
writer.writerow(row)
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
|
| 77 |
def calculate_level(xp):
|
|
|
|
| 25 |
intents = discord.Intents.all()
|
| 26 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
| 27 |
|
| 28 |
+
#logger = logging.getLogger(__name__)
|
| 29 |
+
#logging.basicConfig(level=logging.DEBUG)
|
| 30 |
|
| 31 |
|
| 32 |
""""""
|
|
|
|
| 56 |
|
| 57 |
URL_test = "https://docs.google.com/spreadsheets/d/1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w/edit#gid=0"
|
| 58 |
csv_url_test = URL_test.replace('/edit#gid=', '/export?format=csv&gid=')
|
| 59 |
+
data = pd.read_csv(csv_url)
|
| 60 |
|
| 61 |
+
csv_file = 'import.csv'
|
| 62 |
+
with open(csv_file, 'w', newline='') as file:
|
| 63 |
+
writer = csv.writer(file)
|
| 64 |
+
for row in data:
|
| 65 |
+
writer.writerow(row)
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
+
data2 = open('import.csv', 'r').read()
|
| 68 |
+
worksheet_test = gspread_bot.open("test").sheet1
|
| 69 |
+
gspread_bot.import_csv(worksheet_test.id, csv_content)
|
| 70 |
|
| 71 |
|
| 72 |
+
#worksheet_test.batch_update(["A1:D30", "a"])
|
| 73 |
|
| 74 |
|
| 75 |
def calculate_level(xp):
|