FIX: Fix Playlist issues

FIX: Working on fixing Client issues with PLEX
This commit is contained in:
Dan
2024-06-20 23:50:44 -04:00
parent 100d9af588
commit 4828b8fba4
3 changed files with 64 additions and 24 deletions

View File

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