DOC: Renamed Spotify_cog to Spotify_module (makes more sense)

FIX: Fixed Issues of Selena not starting up
This commit is contained in:
Dan
2024-06-20 22:12:52 -04:00
parent 29d9ee5432
commit 726ec91a79
6 changed files with 91 additions and 66 deletions

10
main.py
View File

@ -8,12 +8,16 @@ class Selena(discord.Client):
self.tree = discord.app_commands.CommandTree(self)
async def setup_hook(self):
for extension in ["cogs.spotify_cog"]:
await self.load_extension(extension)
await self.load_extension("modules.spotify_module")
await self.tree.sync()
async def load_extension(self, name):
module = __import__(name, fromlist=["setup"])
await module.setup(self)
async def on_ready(self):
print("Logged in as {0.user}".format(self))
print(f'Logged in as {self.user} (ID: {self.user.id})')
print('------')
if __name__ == "__main__":