added requirements.txt

This commit is contained in:
2022-08-28 19:25:39 +03:00
parent a603898f2d
commit 78a477f21a
8 changed files with 175 additions and 125 deletions

17
test.py
View File

@@ -1,3 +1,4 @@
import asyncio
import logging
import sys
from os import path
@@ -6,7 +7,7 @@ import disnake
from disnake import OptionChoice, OptionType, Option
from disnake.ext import commands
from lib.CogsPrepare import cog_list, work_with_cogs
from lib.CogsPrepare import work_with_cogs
from lib.Comands import determine_prefix
if not path.isfile('prefix.json'):
@@ -29,19 +30,7 @@ bot = commands.Bot(command_prefix=determine_prefix,
logging.basicConfig(stream=sys.stdout, filemode='w', level='INFO',
format='%(asctime)s - %(levelname)s - %(module)s - %(message)s')
for filename in cog_list():
try:
bot.load_extension(f'cogs.{filename}')
logging.info(f'Loaded cog {filename}')
except commands.ExtensionNotFound:
logging.error(f"Error: {filename} couldn't be found to load.")
except commands.ExtensionFailed as error:
logging.error(f'Error: {filename} failed to load properly.', error)
except commands.ExtensionError:
logging.error(f'Error: unknown error with {filename}')
asyncio.run(work_with_cogs('load', bot))
@bot.event