From 3d659208dbb1188746e9cbbb13a3ccea70fed21f Mon Sep 17 00:00:00 2001 From: AakashS <69010695+Aakash-kun@users.noreply.github.com> Date: Sat, 8 Jan 2022 00:10:38 +0530 Subject: [PATCH 1/2] Update advanced.py --- examples/advanced.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/advanced.py b/examples/advanced.py index 2711cc8..cbb79d4 100644 --- a/examples/advanced.py +++ b/examples/advanced.py @@ -89,11 +89,13 @@ class Music(commands.Cog): self.pomice = pomice.NodePool() # Start the node - bot.loop.create_task(self.start_nodes) + bot.loop.create_task(self.start_nodes()) async def start_nodes(self): # You can pass in Spotify credentials to enable Spotify querying. # If you do not pass in valid Spotify credentials, Spotify querying will not work + # Waiting for the bot to get ready before connecting to nodes. + await self.bot.wait_until_ready() await self.pomice.create_node( bot=self.bot, host="127.0.0.1", From da2c854c7ce8630d3fff8aea889f3d4bbc085091 Mon Sep 17 00:00:00 2001 From: AakashS <69010695+Aakash-kun@users.noreply.github.com> Date: Sat, 8 Jan 2022 10:34:26 +0530 Subject: [PATCH 2/2] Update advanced.py --- examples/advanced.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/advanced.py b/examples/advanced.py index cbb79d4..85350fe 100644 --- a/examples/advanced.py +++ b/examples/advanced.py @@ -92,10 +92,11 @@ class Music(commands.Cog): bot.loop.create_task(self.start_nodes()) async def start_nodes(self): - # You can pass in Spotify credentials to enable Spotify querying. - # If you do not pass in valid Spotify credentials, Spotify querying will not work # Waiting for the bot to get ready before connecting to nodes. - await self.bot.wait_until_ready() + await self.bot.wait_until_ready() + + # You can pass in Spotify credentials to enable Spotify querying. + # If you do not pass in valid Spotify credentials, Spotify querying will not work await self.pomice.create_node( bot=self.bot, host="127.0.0.1",