Added productivity feature

This commit is contained in:
2023-11-19 13:47:16 +01:00
parent bea5e393c6
commit 23c4047bf7
7 changed files with 254 additions and 83 deletions

View File

@@ -1,5 +1,7 @@
import discord
from ..cogs.birthday import BirthdayCog
from ..cogs.productivity import ProductivityCog
from .logger import LOGGER
bot_intents = discord.Intents.default()
bot_intents.message_content = True
@@ -10,4 +12,15 @@ bot_intents.reactions = True
bot = discord.Bot(command_prefix='$', intents=bot_intents)
bot.add_cog(BirthdayCog(bot))
COGS = [BirthdayCog, ProductivityCog]
for cog in COGS:
bot.add_cog(cog(bot))
def reload_feature(feature:str):
LOGGER.debug(bot.cogs)
LOGGER.debug(f'Reloading {feature}...')
bot.remove_cog(feature.capitalize()+'Cog')
cog = globals()[feature.capitalize()+'Cog']
bot.add_cog(cog(bot))
LOGGER.debug(f'{feature} reloaded!')