Add enabling / disabling cogs to config

This commit is contained in:
Daniel Skýpala 2023-12-06 20:13:45 +01:00
parent 77e51c8229
commit 747d17d8d3
2 changed files with 10 additions and 9 deletions

View file

@ -18,13 +18,7 @@ CONFIG = data.load_json(os.path.join(CONFIG_FOLDER, "config"))
bot = commands.Bot() bot = commands.Bot()
cogs_list = [ cogs_list = CONFIG["enabled_cogs"]
'basic',
'roles',
'messages',
'ksp',
'news',
]
for cog in cogs_list: for cog in cogs_list:
bot.load_extension(f'hrochobot.cogs.{cog}') bot.load_extension(f'hrochobot.cogs.{cog}')

View file

@ -1,3 +1,10 @@
{ {
"token": "Paste your token here." "token": "Paste your token here.",
} "enabled_cogs": [
"basic",
"roles",
"messages",
"ksp",
"news"
]
}