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