diff --git a/pomice/player.py b/pomice/player.py index 92aeb84..d73ea60 100644 --- a/pomice/player.py +++ b/pomice/player.py @@ -349,7 +349,7 @@ class Player(VoiceProtocol): method="PATCH", path=self._player_endpoint_uri, guild_id=self._guild.id, - data=data, + data=data or None, ) self._log.debug(f"Swapped all players to new node {new_node._identifier}.") @@ -574,23 +574,14 @@ class Player(VoiceProtocol): self._log.debug(f"Player volume has been adjusted to {volume}") return self._volume - async def move_to(self, *, channel: VoiceChannel) -> None: + async def move_to(self, channel: VoiceChannel) -> None: """Moves the player to a new voice channel.""" - if self.current: - data: dict = {"position": self.position, "encodedTrack": self.current.track_id} - await self.guild.change_voice_state(channel=channel) self.channel = channel await self._dispatch_voice_update() - await self._node.send( - method="PATCH", - path=self._player_endpoint_uri, - guild_id=self._guild.id, - data=data, - ) async def add_filter(self, _filter: Filter, fast_apply: bool = False) -> Filters: """Adds a filter to the player. Takes a pomice.Filter object.