import disnake
import time
import pymongo
import os
import sys
from motor.motor_asyncio import AsyncIOMotorClient
from disnake.ext import commands
from datetime import datetime, timedelta
from motor.motor_asyncio import AsyncIOMotorClient
from pathlib import Path
from config.config import BOT
base_dir = os.path.dirname(os.path.abspath(__file__))
intents = disnake.Intents.all()
bot = commands.Bot(command_prefix="!", intents=intents)
bot.remove_command('help')
@bot.event
async def on_ready():
print(f'\___________/ Logged as {bot.user.name} \_____________/')
def load_cogs(bot):
for folder in ["cogs"]:
folder_path = os.path.join(base_dir, folder.replace(".", os.sep))
if os.path.exists(folder_path):
for file in os.listdir(folder_path):
if file.endswith(".py"):
cog_path = os.path.join(folder_path, file)
cog = cog_path[len(base_dir) + 1 : -3].replace(os.sep, ".")
try:
bot.load_extension(cog)
print(f"Ког {cog} был успешно загружен")
except Exception as e:
print(f"Не удалось загрузить ког {cog}: {e}")
else:
print(f"Папка {folder} не найдена")
bot.run("")
сделай просто как я и все