Move cogs to load to options.py (#33)

* list of cogs in options.py instead of hardcoded.

* moved the playing status to options.py

* add all cogs to the template
This commit is contained in:
Abigail Gold 2019-10-08 23:02:57 -04:00 committed by GitHub
parent 5ebcebcac2
commit a0cb64789b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

11
main.py
View File

@ -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()

View File

@ -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'