8 lines
308 B
Python
Raw Normal View History

2023-02-01 14:52:56 -08:00
import json
import random
from . import core
@core.app.route("/tick")
def tick():
return random.choices([json.dumps({"code": 200, "event_type": 0}), json.dumps({"code": 200, "event_type": 1, "log": "The server chose a flavor text event, which hasn't been fully implemented yet."})], weights=[16, 1])[0]