Add enabling / disabling cogs to config
This commit is contained in:
		
							parent
							
								
									77e51c8229
								
							
						
					
					
						commit
						747d17d8d3
					
				
					 2 changed files with 10 additions and 9 deletions
				
			
		|  | @ -18,13 +18,7 @@ CONFIG = data.load_json(os.path.join(CONFIG_FOLDER, "config")) | |||
| 
 | ||||
| bot = commands.Bot() | ||||
| 
 | ||||
| cogs_list = [ | ||||
|     'basic', | ||||
|     'roles', | ||||
|     'messages', | ||||
|     'ksp', | ||||
|     'news', | ||||
| ] | ||||
| cogs_list = CONFIG["enabled_cogs"] | ||||
| 
 | ||||
| for cog in cogs_list: | ||||
|     bot.load_extension(f'hrochobot.cogs.{cog}') | ||||
|  |  | |||
|  | @ -1,3 +1,10 @@ | |||
| { | ||||
|     "token": "Paste your token here." | ||||
| } | ||||
|     "token": "Paste your token here.", | ||||
|     "enabled_cogs": [ | ||||
|         "basic", | ||||
|         "roles", | ||||
|         "messages", | ||||
|         "ksp", | ||||
|         "news" | ||||
|     ] | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue