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)
def formatData(data):
dataToFormat = data
created = str(data['created'])
description = str(data['desc'])
imageid = str(data['iid'])
ocr = str(data['ocr'])
score = str(data['score'])
return created, description, imageid, ocr, score
if data is not None:
dataToFormat = data
created = str(data['created'])
description = str(data['desc'])
imageid = str(data['iid'])
ocr = str(data['ocr'])
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:
created, description, imageid, ocr, score = formatData(quoteData)

View file

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