move cogs to ext and create module

This commit is contained in:
fanyx 2020-11-13 15:53:55 +01:00
parent 07e638985e
commit cd1d899054
2 changed files with 2 additions and 2 deletions

View File

@ -14,10 +14,10 @@ bot = Bot(command_prefix="~ak ")
token = config['AUTH']['token'] token = config['AUTH']['token']
# load extensions # load extensions
for file in os.listdir("src/cogs"): for file in os.listdir("src/ext"):
if file.endswith(".py"): if file.endswith(".py"):
name = file[:-3] name = file[:-3]
bot.load_extension(f"src.cogs.{name}") bot.load_extension(f"src.ext.{name}")
if __name__ == "__main__": if __name__ == "__main__":
bot.run(token) bot.run(token)

0
src/ext/__init__.py Normal file
View File