import logging import discord from .commands import lsstuff from .post import post _logger = logging.getLogger(__name__) class LenaverseBot(discord.Client): def __init__(self) -> None: intents = discord.Intents.default() intents.message_content = True super().__init__(intents=intents) self.tree = discord.app_commands.CommandTree(self) self.tree.add_command(post) self.tree.add_command(lsstuff) async def setup_hook(self): await self.tree.sync() _logger.info("Commands synced") async def on_ready(self) -> None: if self.user is None: return _logger.info(f"{self.user.name} has connected to Discord!")