1
0
Fork 0
mirror of synced 2024-05-18 19:42:28 +12:00

Add a check for if the state exists

This commit is contained in:
Phxntxm 2017-07-16 19:46:06 -05:00
parent dec0875e10
commit 041fd8628e

View file

@ -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