Debug GitLab note DM v8
This commit is contained in:
parent
fbd225ea6d
commit
01dd4979d8
2 changed files with 5 additions and 5 deletions
3
bot.py
3
bot.py
|
|
@ -266,6 +266,3 @@ class MyBot(commands.Bot):
|
||||||
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()
|
|
||||||
5
kuby.py
5
kuby.py
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue