Changed the Client structure
This commit is contained in:
11
cogs/data.py
11
cogs/data.py
@@ -1,4 +1,5 @@
|
||||
import logging
|
||||
from logging import Logger
|
||||
from os import makedirs
|
||||
from pathlib import Path
|
||||
from typing import Union, List, Dict, Any
|
||||
@@ -9,21 +10,21 @@ from discord import utils as ds_utils
|
||||
from discord.commands import SlashCommandGroup
|
||||
from discord.ext import commands
|
||||
from libbot import config_get
|
||||
from libbot.pycord.classes import PycordBot
|
||||
from libbot.sync import config_get as sync_config_get
|
||||
from libbot.sync import json_write as sync_json_write
|
||||
|
||||
from classes.holo_bot import HoloBot
|
||||
from classes.holo_user import HoloUser
|
||||
from enums import Color
|
||||
from modules.database import col_users
|
||||
from modules.utils_sync import guild_name
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger: Logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Data(commands.Cog):
|
||||
def __init__(self, client: PycordBot):
|
||||
self.client: PycordBot = client
|
||||
def __init__(self, client: HoloBot):
|
||||
self.client: HoloBot = client
|
||||
|
||||
data: SlashCommandGroup = SlashCommandGroup("data", "Керування даними користувачів")
|
||||
|
||||
@@ -179,5 +180,5 @@ class Data(commands.Cog):
|
||||
)
|
||||
|
||||
|
||||
def setup(client: PycordBot) -> None:
|
||||
def setup(client: HoloBot) -> None:
|
||||
client.add_cog(Data(client))
|
||||
|
Reference in New Issue
Block a user