import discord
from discord.ext import commands
from cogs import Troll, Infos

class RumBot(commands.Bot):
    """
    La classe du bot qui lance les cogs et démarre le bot
    """
    def __init__(self) -> None:
        super().__init__(command_prefix="!", intents=discord.Intents.all())

    async def setup_hook(self) -> None: # appelée avant on_ready
        await self.add_cog(Troll(self))
        await self.add_cog(Infos(self))
        await self.tree.sync()

    async def on_ready(self) -> None:
        print("Le bot est en ligne")