1
0
Fork 0
mirror of https://code.lenaisten.de/Lenaisten/lenaverse-bot.git synced 2024-11-22 15:03:01 +00:00
lenaverse-bot/lenaverse_bot/core/bot.py

28 lines
620 B
Python
Raw Normal View History

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!")