diff --git a/main.py b/main.py index a715063..e9177b7 100644 --- a/main.py +++ b/main.py @@ -99,7 +99,7 @@ async def on_ready(): @tasks.loop(minutes=5) async def _ensure_activity(): - await bot.change_presence(activity=discord.Game(name="with lids on 7.200")) + await bot.change_presence(activity=discord.Game(name=opt.game)) @_ensure_activity.before_loop @@ -110,13 +110,8 @@ async def _before_ensure_activity(): # --- Run --- bot.add_cog(GlobalSettings(bot)) -bot.load_extension("cogs.basecog") -bot.load_extension("cogs.morsecog") -bot.load_extension("cogs.funcog") -bot.load_extension("cogs.gridcog") -bot.load_extension("cogs.hamcog") -bot.load_extension("cogs.imagecog") -bot.load_extension("cogs.studycog") +for cog in opt.cogs: + bot.load_extension(f"cogs.{cog}") _ensure_activity.start() diff --git a/templates/template_options.py b/templates/template_options.py index acf65bc..549f4b4 100644 --- a/templates/template_options.py +++ b/templates/template_options.py @@ -24,3 +24,10 @@ debug = False # * Those users will have full control over the bot. # ! This MUST be a tuple of integers. Single element tuple: `(123,)` owners_uids = (200102491231092736,) + +# The cogs to load when running the bot. +cogs = ['basecog', 'morsecog', 'funcog', 'gridcog', 'hamcog', 'imagecog', + 'studycog'] + +# The text to put in the "playing" status. +game = 'with lids on 7.200'