8 lines
308 B
Python

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]