From 096368903a5ae03c55a339d94e73a940ec027b08 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 11 Oct 2024 00:52:46 +0200 Subject: [PATCH] Python 3.9 compatibility fix --- config.yaml | 2 +- utils.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index 91fe8a1..a946592 100644 --- a/config.yaml +++ b/config.yaml @@ -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 diff --git a/utils.py b/utils.py index 3e0c610..c928002 100644 --- a/utils.py +++ b/utils.py @@ -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