Files
Momentum/bot.py
2026-02-09 17:08:27 -06:00

27 lines
630 B
Python

from dotenv import load_dotenv
load_dotenv() # MUST be first
import discord
from discord import app_commands
import os
from db import init_db
from commands import register
class Momentum(discord.Client):
def __init__(self):
super().__init__(intents=discord.Intents.default())
self.tree = app_commands.CommandTree(self)
async def setup_hook(self):
register(self.tree)
await self.tree.sync()
print("🌐 Commands synced")
async def on_ready(self):
print(f"🔥 Momentum online as {self.user}")
init_db()
bot = Momentum()
bot.run(os.getenv("DISCORD_TOKEN"))