diff --git a/Music-bot/cogs/utils/checks.py b/Music-bot/cogs/utils/checks.py index 336149f43ddd3e1b554c9aedb6a69543bfaeed1b..6c1fc2ce3991f5691f8c229e5a53ed7191594c01 100644 --- a/Music-bot/cogs/utils/checks.py +++ b/Music-bot/cogs/utils/checks.py @@ -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: - 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 + vc = ctx.voice_client + 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 return commands.check(predicate) \ No newline at end of file