Ajout système de tâches et Fix: suggerer et signaler_bug

This commit is contained in:
Mathis 2026-06-07 16:22:17 +02:00
parent a49aa6717f
commit f1c0921a58
7 changed files with 1434 additions and 5 deletions

View file

@ -6,6 +6,7 @@ import logging
import json
import os
import asyncio
from typing import Dict, Any, Optional
kuby_logger = logging.getLogger("KubyBot")
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -222,6 +223,13 @@ class BugReport(commands.Cog):
os.makedirs(REPORTS_DIR, exist_ok=True)
await self._start_webhook_server()
# ⚡ Enregistrement des vues persistantes (boutons panel)
# Sans ça, après un redémarrage les boutons "Remplir le formulaire"
# dans les anciens messages de panel ne fonctionnent plus.
self.bot.add_view(BugReportView(self))
self.bot.add_view(FeatureSuggestionView(self))
kuby_logger.info("✅ Vues persistantes BugReport enregistrées (open_bug_form, open_suggestion_form)")
async def _start_webhook_server(self):
try:
app = web.Application()