Files
Nessa/dolly/dolly.py

22 lines
652 B
Python

import discord
from discord import app_commands
from .commands import DollyTracker
from dotenv import load_dotenv
import os
load_dotenv()
GUILD_ID = int(os.getenv("DISCORD_GUILD_ID"))
class Dolly(discord.Client):
def __init__(self):
super().__init__(intents=discord.Intents.default())
self.tree = app_commands.CommandTree(self)
async def setup_hook(self):
self.tree.add_command(DollyTracker())
self.tree.copy_global_to(guild = discord.Object(id=GUILD_ID))
await self.tree.sync(guild = discord.Object(id=GUILD_ID))
async def on_ready(self):
print(f"Logged on as {self.user}!")