<gh_stars>1-10
import discord
from discord.ext import commands
from discord_slash import SlashCommand
from utils.get_datas import GetDatas
import json
import os
import sys

data = GetDatas.CONFIGURAION.load()
token = data["token"]
bot_version = data["version"]
default_prefix = data["default_prefix"]

def get_prefix(bot, message):
	return default_prefix

intents = discord.Intents.all()
bot = commands.Bot(command_prefix= get_prefix, case_insensitive=True, intents = intents)
slash = SlashCommand(bot, sync_commands=True)

@bot.event
async def on_ready():
	os.system("cls||clear")
	print(f"We have logged in as {bot.user}")
	print(f"python version: {sys.version}")
	print(f"discord version: {discord.__version__}")
	print(f"bot version: {bot_version}")

def load_cogs(path: str):
	for filename in os.listdir(path):
		if os.path.isfile(path + "/" + filename):
			if filename.endswith(".py"):
				cog_path = path.replace("/", ".")
				bot.load_extension(f"{cog_path}.{filename[:-3]}")
		elif os.path.isdir(path + "/" + filename):
			load_cogs(path + "/" + filename)

if __name__ == '__main__':
	load_cogs("Cogs")

bot.run(token)
import discord
from discord.ext import commands
from discord_slash import SlashCommand
from utils.get_datas import GetDatas
import json
import os
import sys

data = GetDatas.CONFIGURAION.load()
token = data["token"]
bot_version = data["version"]
default_prefix = data["default_prefix"]

def get_prefix(bot, message):
	return default_prefix

intents = discord.Intents.all()
bot = commands.Bot(command_prefix= get_prefix, case_insensitive=True, intents = intents)
slash = SlashCommand(bot, sync_commands=True)

@bot.event
async def on_ready():
	os.system("cls||clear")
	print(f"We have logged in as {bot.user}")
	print(f"python version: {sys.version}")
	print(f"discord version: {discord.__version__}")
	print(f"bot version: {bot_version}")

def load_cogs(path: str):
	for filename in os.listdir(path):
		if os.path.isfile(path + "/" + filename):
			if filename.endswith(".py"):
				cog_path = path.replace("/", ".")
				bot.load_extension(f"{cog_path}.{filename[:-3]}")
		elif os.path.isdir(path + "/" + filename):
			load_cogs(path + "/" + filename)

if __name__ == '__main__':
	load_cogs("Cogs")

bot.run(token)