Debug GitLab note DM v8

This commit is contained in:
Mathis 2026-05-20 16:43:54 +02:00
parent fbd225ea6d
commit 01dd4979d8
2 changed files with 5 additions and 5 deletions

3
bot.py
View file

@ -266,6 +266,3 @@ class MyBot(commands.Bot):
if isinstance(error, commands.CheckFailure):
return
kuby_logger.error(f"Command error in {ctx.command}: {str(error)}", exc_info=True)
bot = MyBot()

View file

@ -2,7 +2,7 @@ import asyncio
import os
import sys
from dotenv import load_dotenv
from bot import bot
from bot import MyBot # Modification ici : on importe la classe
from src.logger import kuby_logger, log_performance
kuby_logger.info("🚀 Lancement du bot Kuby...")
@ -28,6 +28,9 @@ kuby_logger.info("✅ Token Discord chargé avec succès")
async def main():
kuby_logger.info("🔄 Démarrage de la connexion Discord...")
try:
# Modification majeure : l'objet bot est instancié ici, au sein de la boucle active
bot = MyBot()
await bot.do_async_setup()
kuby_logger.info("🔗 Connexion établie avec Discord...")
await bot.start(TOKEN)