Eh, kinda working
This commit is contained in:
26
bot.py
Normal file
26
bot.py
Normal file
@@ -0,0 +1,26 @@
|
||||
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"))
|
||||
Reference in New Issue
Block a user