Update server.py

This commit is contained in:
Justin 2023-07-12 17:27:08 +08:00 committed by GitHub
parent ec7c07d0a1
commit 6ad88d488f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,6 +339,8 @@ def index():
f = open('csv/jokes_settings.json', 'r')
jokes_settings = json.load(f)
f.close()
if not jokes_settings['categories']:
jokes_settings['categories'] = ['Any']
except:
jokes_settings = {"feature": "Jokes", "speed": "medium", "speed2": "medium", "animation": "up", "title": True, "categories": ["Any"], "blacklist": [], "amount": "5", "jokes": []}