FEAT: Added Plex Module

FIX: Fixed Spotify Module
Fix: Fixed Sync Issues
DOC: Added .env references for new APIs
This commit is contained in:
Dan
2024-06-20 23:00:20 -04:00
parent ed66d6438f
commit 965a7d5637
4 changed files with 106 additions and 7 deletions

View File

@ -8,8 +8,12 @@ class Selena(discord.Client):
self.tree = discord.app_commands.CommandTree(self)
async def setup_hook(self):
await self.load_extension("modules.spotify_module")
await self.tree.sync()
guild = discord.Object(id=config.DISCORD_GUILD_ID)
modules = ["modules.spotify_module", "modules.plex_module"]
for module in modules:
await self.load_extension(module)
# self.tree.copy_global_to(guild=guild)
await self.tree.sync(guild=guild)
async def load_extension(self, name):
module = __import__(name, fromlist=["setup"])