Skip to content
Snippets Groups Projects
Commit e0df4bf6 authored by Sami's avatar Sami
Browse files

Music: Fixed the checks that prevented usage of stop command.

parent 11a7fb22
No related branches found
No related tags found
No related merge requests found
......@@ -124,18 +124,12 @@ def song_requester_or_owner_or_dj():
def music_stop_check():
async def predicate(ctx):
is_owner = await ctx.bot.is_owner(ctx.author)
try:
vc = ctx.voice_client
if ctx.message.author.name == vc.source.requester.name:
return True
elif is_owner:
if is_owner:
return True
elif discord.utils.get(ctx.message.author.roles, name="DJ"):
return True
elif ctx.message.author != vc.source.requester or not discord.utils.get(ctx.message.author.roles, name="DJ"):
await ctx.send(f"You lack the permissions to use this command, sorry.")
return False
except AttributeError:
pass
return commands.check(predicate)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment