Make tracebacks only in debug builds
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user