This commit is contained in:
jbkzi
2026-02-20 22:26:49 +01:00
commit 7ddc49e24a
7 changed files with 145 additions and 0 deletions

29
bot.py Normal file
View File

@@ -0,0 +1,29 @@
import discord
import asyncio
from discord.ext import commands
from config import Config
class RealBot(commands.Bot):
def __init__(self):
intents = discord.Intents.default()
intents.messages = True
intents.message_content = True
intents.members = True
super().__init__(command_prefix="!", intents=intents)
async def setup_hook(self):
# Loads the extension from the 'cogs' folder
# Note the dot notation: cogs.logger
await self.load_extension("cogs.logger")
print("Logger extension loaded.")
async def on_ready(self):
print(f"Logged in as {self.user} (ID: {self.user.id})")
print("---------------------------------------------")
if __name__ == "__main__":
bot = RealBot()
try:
bot.run(Config.BOT_TOKEN)
except Exception as e:
print(f"Error: {e}")