From 5bc27bad589e6f73a5d0d3185489fd3d8ddae975 Mon Sep 17 00:00:00 2001 From: vveeps <54472340+vveeps@users.noreply.github.com> Date: Thu, 28 Oct 2021 16:13:36 +0300 Subject: [PATCH] don't stop playback on disconnect (+ change some docstrings) --- pomice/player.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pomice/player.py b/pomice/player.py index 5b33218..fcd40d7 100644 --- a/pomice/player.py +++ b/pomice/player.py @@ -197,13 +197,12 @@ class Player(VoiceProtocol): self._is_connected = True async def stop(self): - """Stops a currently playing track.""" + """Stops the currently playing track.""" self._current = None await self._node.send(op="stop", guildId=str(self.guild.id)) async def disconnect(self, *, force: bool = False): - await self.stop() - + """Disconnects the player from voice and handles internal state cleanup.""" try: await self.guild.change_voice_state(channel=None) finally: @@ -213,7 +212,7 @@ class Player(VoiceProtocol): del self._node._players[self.guild.id] async def destroy(self): - """Disconnects a player and destroys the player instance.""" + """Disconnects the player and sends a call to destroy the player on Lavalink's end.""" await self.disconnect() await self._node.send(op="destroy", guildId=str(self.guild.id))