1
0
Fork 0

Fuck you zayd

This commit is contained in:
Nyx 2025-02-02 00:11:49 -06:00
parent b685fa6e18
commit b572834329
2 changed files with 17 additions and 8 deletions

23
bot.py
View file

@ -79,13 +79,22 @@ async def make_choice(room, message):
quoteData = fetch.fetchQuoteData(id) quoteData = fetch.fetchQuoteData(id)
def formatData(data): def formatData(data):
dataToFormat = data if data is not None:
created = str(data['created']) dataToFormat = data
description = str(data['desc']) created = str(data['created'])
imageid = str(data['iid']) description = str(data['desc'])
ocr = str(data['ocr']) imageid = str(data['iid'])
score = str(data['score']) ocr = str(data['ocr'])
return created, description, imageid, ocr, score score = str(data['score'])
return created, description, imageid, ocr, score
else:
dataToFormat = data
created = "Error"
description = "Error"
imageid = "Error"
ocr = "Error"
score = "Error"
return created, description, imageid, ocr, score
if debugMode == False: if debugMode == False:
created, description, imageid, ocr, score = formatData(quoteData) created, description, imageid, ocr, score = formatData(quoteData)

View file

@ -30,7 +30,7 @@ def fetchQuoteData(quoteId):
print(quoteData.json()) print(quoteData.json())
else: else:
print(f"An error occured while saving the file: {quoteData.status_code}") print(f"An error occured while saving the file: {quoteData.status_code}")
return "This file probably doesn't exist." return None
def fetchTopQuotes(instance): def fetchTopQuotes(instance):
raise NotImplementedError raise NotImplementedError