lenaverse-bot/lenaverse_bot/core/bot.py

27 lines
620 B
Python

import logging
import discord
from discord.ext.commands import Bot
from .commands import foo, ping
_logger = logging.getLogger(__name__)
class LenaverseBot(Bot):
def __init__(self) -> None:
intents = discord.Intents.default()
intents.message_content = True
super().__init__(
command_prefix="!",
intents=intents,
)
self.add_command(ping)
self.add_command(foo)
async def on_ready(self) -> None:
_logger.info(self.guilds)
assert self.user is not None
_logger.info(f"{self.user.name} has connected to Discord!")