Make tracebacks only in debug builds

This commit is contained in:
2026-01-28 18:22:06 -08:00
parent 28fbdab904
commit 509a7d8a74
2 changed files with 8 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ from interactions.api.events import Startup
from token_bot.token_database import database as pdb
from token_bot.token_database import database as tdb
VERSION = "0.9.11"
VERSION = "0.9.12"
class Core(Extension):

View File

@@ -15,7 +15,13 @@ class TokenBot:
)
log = logging.getLogger("TokenBotLogger")
log.setLevel(logging.INFO)
self.bot = Client(intents=Intents.DEFAULT, asyncio_debug=True, logger=log)
is_debug = os.getenv("ENV") == "DEBUG"
self.bot = Client(
intents=Intents.DEFAULT,
asyncio_debug=is_debug,
send_command_tracebacks=is_debug,
logger=log,
)
def run(self):
self.bot.load_extension("token_bot.core")