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 # Bot configuration
token: "Your token here!"
prefix: "!" prefix: "!"
token: ""
github_url: "https://git.norbipeti.eu/ExMods/RC2Bot" github_url: "https://git.norbipeti.eu/ExMods/RC2Bot"
# A list of cogs to load at startup # A list of cogs to load at startup

View file

@ -1,4 +1,5 @@
import logging import logging
from typing import Union
import discord import discord
import humanfriendly import humanfriendly
@ -75,7 +76,7 @@ def mod_only():
# Gross function, but it works. # 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 # route_key is your YAML key
# Data defaults to None so we don't have to set it # Data defaults to None so we don't have to set it