From b44b5fc587bdc69be0e9a05fc2b34ff465f95009 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 5 Dec 2019 22:28:24 +0100 Subject: [PATCH] [5.1.4] Fix voice chat bug --- pyproject.toml | 2 +- royalnet/serf/discord/discordserf.py | 2 ++ royalnet/version.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 51722e9f..d7b6ab5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ [tool.poetry] name = "royalnet" - version = "5.1.3" + version = "5.1.4" description = "A multipurpose bot and web framework" authors = ["Stefano Pigozzi "] license = "AGPL-3.0+" diff --git a/royalnet/serf/discord/discordserf.py b/royalnet/serf/discord/discordserf.py index 71e25466..91b8f5fe 100644 --- a/royalnet/serf/discord/discordserf.py +++ b/royalnet/serf/discord/discordserf.py @@ -238,6 +238,8 @@ class DiscordSerf(Serf): def find_voice_player(self, guild: "discord.Guild") -> Optional[VoicePlayer]: for voice_player in self.voice_players: + if not voice_player.voice_client.is_connected(): + continue if voice_player.voice_client.guild == guild: return voice_player else: diff --git a/royalnet/version.py b/royalnet/version.py index 70cfc919..089f9b96 100644 --- a/royalnet/version.py +++ b/royalnet/version.py @@ -1 +1 @@ -semantic = "5.1.3" +semantic = "5.1.4"