|
@@ -4,9 +4,9 @@ import io
|
|
|
import asyncio
|
|
|
import logging.config
|
|
|
import os
|
|
|
+import tomllib
|
|
|
from typing import Any
|
|
|
|
|
|
-import toml
|
|
|
import discord
|
|
|
|
|
|
import rollbot
|
|
@@ -14,8 +14,8 @@ from commands import config
|
|
|
|
|
|
logging.config.fileConfig("logging.conf", disable_existing_loggers=False)
|
|
|
|
|
|
-with open(os.environ.get("SECRET_FILE", "secrets.toml"), "r") as sfile:
|
|
|
- secrets = toml.load(sfile)
|
|
|
+with open(os.environ.get("SECRET_FILE", "secrets.toml"), "rb") as sfile:
|
|
|
+ secrets = tomllib.load(sfile)
|
|
|
database_file = os.environ.get("DATABASE_FILE", secrets["database_file"])
|
|
|
bangs = tuple(t for t in secrets["discord"].get("bangs", "!/"))
|
|
|
|