From 00f2748235fbc3d6d9c6b3d465841a0c3e6bb4ab Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 18 Jun 2024 23:44:13 -0400 Subject: [PATCH] FIX: Bot starts now. DOC: Need to test commands and such, find problems. --- bot.db | Bin 0 -> 8192 bytes main.py | 19 +++++-------------- 2 files changed, 5 insertions(+), 14 deletions(-) create mode 100644 bot.db diff --git a/bot.db b/bot.db new file mode 100644 index 0000000000000000000000000000000000000000..b5477bb8a6ef6f07caee34a2e667490805c17754 GIT binary patch literal 8192 zcmeI#PYZ%D7zXf7f*^>xb$z`RR1kfEEJjooWrOk*Mhm2Wpz8zFCvOTO<)L%&JUHgN zcRKjpwqCiRR&=~Ymq1gW)fwk(K*Sj1W>{uqN$OHom^rDxg|qHvS~a_P&1L36AOHaf zKmY;|fB*y_009U<00KWR@aXY!!?yXeql5if-D4H)t~agX{LLD9!jXccGjs*z>(s2! zN780^pvgjtvG8c=P3Dg0(@gm7!shfCl42{1y;w)#NyXWZ-o9-mcXM;;M<4(J2tWV= T5P$##AOHafKmY;|_+x<=Au}}* literal 0 HcmV?d00001 diff --git a/main.py b/main.py index 790612f..90e1ce8 100644 --- a/main.py +++ b/main.py @@ -1,10 +1,10 @@ import discord from discord.ext import commands import aiosqlite -import asyncio import os import sys import subprocess +import asyncio from dotenv import load_dotenv load_dotenv() @@ -16,15 +16,13 @@ intents.message_content = True intents.members = True -class Ariella(discord.Client): +class Ariella(commands.Bot): def __init__(self): - super().__init__(intents=intents) - self.tree = discord.app_commands.CommandTree(self) + super().__init__(command_prefix='!', intents=intents) async def setup_hook(self): - await self.tree.sync() - # Load commands await self.load_extension('commands') + await self.tree.sync() bot = Ariella() @@ -54,11 +52,4 @@ async def on_ready(): async def on_guild_join(guild): await bot.tree.sync(guild=guild) - -# Load commands -async def load_commands(): - await bot.load_extension('commands') - -asyncio.run(load_commands()) - -bot.run('TOKEN') +bot.run(TOKEN)