import asyncio import discord from discord.ext import commands from app.cfg import DSC_TOKEN class DiscordApp(commands.Bot): def __init__(self): intents = discord.Intents.default() intents.message_content = True super().__init__(command_prefix = "!", intents = intents) async def setup_hook(self): await self.load_extension('ext.aurochs') print("Cogs loaded.") async def on_ready(self): print(f"Logged in as {self.user}. Ready!") async def close(self): await super().close() async def main(): bot = DiscordApp() async with bot: await bot.start(DSC_TOKEN) if __name__ == "__main__": print("Starting...") try: asyncio.run(main()) except KeyboardInterrupt: print("\nInterrupt recieved. Stopping...")