Skip to content

Commit

Permalink
remove owner check, move mutual vc check down
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke authored Mar 19, 2018
1 parent f4358cd commit a0c69cb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,16 @@ async def find(self, ctx, *, query):

await ctx.send(embed=embed)

@commands.is_owner()
@commands.command(aliases=['dc'])
async def disconnect(self, ctx):
player = self.bot.lavalink.players.get(ctx.guild.id)

if not ctx.author.voice or (player.is_connected and ctx.author.voice.channel.id != int(player.channel_id)):
return await ctx.send('You\'re not in my voicechannel!')

if not player.is_connected:
return await ctx.send('Not connected.')

if not ctx.author.voice or (player.is_connected and ctx.author.voice.channel.id != int(player.channel_id)):
return await ctx.send('You\'re not in my voicechannel!')

await player.disconnect()
await ctx.send('*⃣ | Disconnected.')

Expand Down

0 comments on commit a0c69cb

Please sign in to comment.