mirror of
https://code.lenaisten.de/Lenaisten/lenaverse-bot.git
synced 2024-11-22 15:03:01 +00:00
25 lines
643 B
Python
25 lines
643 B
Python
import logging
|
|
|
|
import discord
|
|
|
|
from .commands import lsstuff
|
|
from .post import ev_post
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
class LenaverseBot(discord.Client):
|
|
def __init__(self) -> None:
|
|
super().__init__(intents=discord.Intents.default())
|
|
|
|
self.tree = discord.app_commands.CommandTree(self)
|
|
self.tree.add_command(ev_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:
|
|
assert self.user is not None
|
|
_logger.info(f"{self.user.name} has connected to Discord!")
|