Files
Momentum/bot.py
2026-02-09 14:08:41 -06:00

27 lines
613 B
Python

import discord
from discord import app_commands
from dotenv import load_dotenv
import os
from db import init_db
from commands import register
load_dotenv()
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"))