Python 3.9 compatibility fix

This commit is contained in:
Norbi Peti 2024-10-11 00:52:46 +02:00
parent 9c671f47c5
commit 096368903a
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,6 @@
# Bot configuration
token: "Your token here!"
prefix: "!"
token: ""
github_url: "https://git.norbipeti.eu/ExMods/RC2Bot"
# A list of cogs to load at startup

View file

@ -1,4 +1,5 @@
import logging
from typing import Union
import discord
import humanfriendly
@ -75,7 +76,7 @@ def mod_only():
# Gross function, but it works.
def handle_api_request(route_key, data=None) -> tuple[dict | list | None, str]:
def handle_api_request(route_key, data=None) -> tuple[Union[dict, list, None]]:
# route_key is your YAML key
# Data defaults to None so we don't have to set it