Make tracebacks only in debug builds
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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