import discord, asyncio import os from discord.ext import commands from discord import app_commands import database.controller intents = discord.Intents.default() intents.members = True intents.dm_messages = True app = commands.Bot(command_prefix=",", intents=intents) app.db = database.controller.Database("database.db") # load cogs async def load_cogs(): for filename in os.listdir("bot/commands"): if filename.endswith(".py"): await app.load_extension(f"bot.commands.{filename[:-3]}") @app.event async def on_ready(): print("Running") await load_cogs() await app.tree.sync()