From 041fd8628ef9357e7ef033d021e48abb7521d223 Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Sun, 16 Jul 2017 19:46:06 -0500 Subject: [PATCH] Add a check for if the state exists --- cogs/music.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/music.py b/cogs/music.py index 5848541..8f92905 100644 --- a/cogs/music.py +++ b/cogs/music.py @@ -521,8 +521,9 @@ class Music: if not await ctx.invoke(self.join): return + state = self.voice_states.get(ctx.message.guild.id) # If this is a user queue, this is the wrong command - if self.voice_states.get(ctx.message.guild.id).user_queue: + if state and state.user_queue: await ctx.send("The current queue type is the DJ queue. " "Use the command {}dj to join this queue".format(ctx.prefix)) return