Changed the Client structure

This commit is contained in:
2024-12-17 22:14:06 +01:00
parent 62a36a3747
commit 36d63e0240
10 changed files with 117 additions and 79 deletions

View File

@@ -4,14 +4,14 @@ from discord import Member, Message, TextChannel
from discord import utils as ds_utils
from discord.ext import commands
from libbot import config_get
from libbot.pycord.classes import PycordBot
from classes.holo_bot import HoloBot
from modules.database import col_users
class Logger(commands.Cog):
def __init__(self, client: PycordBot):
self.client: PycordBot = client
def __init__(self, client: HoloBot):
self.client: HoloBot = client
@commands.Cog.listener()
async def on_message(self, message: Message):
@@ -65,5 +65,5 @@ class Logger(commands.Cog):
await col_users.insert_one(document=user)
def setup(client: PycordBot) -> None:
def setup(client: HoloBot) -> None:
client.add_cog(Logger(client))