1
0
Fork 0
mirror of https://code.lenaisten.de/Lenaisten/lenaverse-bot.git synced 2024-12-22 19:13:01 +00:00

empty discord bot

This commit is contained in:
Jörn-Michael Miehe 2023-11-17 10:53:10 +01:00
parent 876cd4ab53
commit 5a630aff26
3 changed files with 36 additions and 1 deletions

View file

@ -0,0 +1,3 @@
import discord
discord.utils.setup_logging()

21
lenaverse_bot/core/bot.py Normal file
View file

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

View file

@ -1,5 +1,16 @@
import os
from .core.bot import LenaverseBot
def main() -> None:
print("Hello World")
TOKEN = os.getenv("TTSBOT_TOKEN") or ""
bot = LenaverseBot()
bot.run(
token=TOKEN,
log_handler=None,
)
if __name__ == "__main__":