discordBot/scr/myBot.py
2025-06-19 14:17:11 -05:00

32 lines
706 B
Python

import discord
from discord.ext import commands
from config import Config
class MyBot(commands.Bot):
def __init__(self, config: Config):
intents = discord.Intents.default()
intents.message_content = True
intents.members = True
intents.voice_states = True
intents = intents.all()
super().__init__(command_prefix=config.BOT.prefix, intents=intents)
self.config: Config = config
super().run(self.config.BOT.token)
async def setup_hook(self) -> None:
modules = [
"modules.youtrackIntegration",
"modules.TMC"
]
for module in modules:
await self.load_extension(module)
return await super().setup_hook()
async def on_ready(self):
print(f'Bot started as {self.user}')