diff --git a/royalnet/bots/discord.py b/royalnet/bots/discord.py index e9cdcb7e..1fc21de2 100644 --- a/royalnet/bots/discord.py +++ b/royalnet/bots/discord.py @@ -242,6 +242,7 @@ class DiscordBot(GenericBot): def advance(error=None): if error: voice_client.disconnect(force=True) + guild_music_data.voice_client = None log.error(f"Error while advancing music_data: {error}") return self.loop.create_task(self.advance_music_data(guild)) diff --git a/royalnet/packs/royal/commands/skip.py b/royalnet/packs/royal/commands/skip.py index 222486e7..48e2a4ed 100644 --- a/royalnet/packs/royal/commands/skip.py +++ b/royalnet/packs/royal/commands/skip.py @@ -27,7 +27,7 @@ class SkipCommand(Command): guild = list(bot.client.guilds)[0] # Set the currently playing source as ended voice_client: discord.VoiceClient = bot.client.find_voice_client_by_guild(guild) - if not (voice_client.is_playing() or voice_client.is_paused()): + if voice_client and not (voice_client.is_playing() or voice_client.is_paused()): raise CommandError("Nothing to skip") # noinspection PyProtectedMember voice_client._player.stop()