Merge branch 'dev' into 'main'

Debug GitLab note DM v8

See merge request Omega_Kube/kuby!24
This commit is contained in:
Gameur 2026-05-20 16:44:16 +02:00
commit 7245f5190d
2 changed files with 5 additions and 5 deletions

5
bot.py
View file

@ -265,7 +265,4 @@ class MyBot(commands.Bot):
return return
if isinstance(error, commands.CheckFailure): if isinstance(error, commands.CheckFailure):
return return
kuby_logger.error(f"Command error in {ctx.command}: {str(error)}", exc_info=True) 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 os
import sys import sys
from dotenv import load_dotenv 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 from src.logger import kuby_logger, log_performance
kuby_logger.info("🚀 Lancement du bot Kuby...") kuby_logger.info("🚀 Lancement du bot Kuby...")
@ -28,6 +28,9 @@ kuby_logger.info("✅ Token Discord chargé avec succès")
async def main(): async def main():
kuby_logger.info("🔄 Démarrage de la connexion Discord...") kuby_logger.info("🔄 Démarrage de la connexion Discord...")
try: try:
# Modification majeure : l'objet bot est instancié ici, au sein de la boucle active
bot = MyBot()
await bot.do_async_setup() await bot.do_async_setup()
kuby_logger.info("🔗 Connexion établie avec Discord...") kuby_logger.info("🔗 Connexion établie avec Discord...")
await bot.start(TOKEN) await bot.start(TOKEN)