29 lines
877 B
Python
29 lines
877 B
Python
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}") |