Skip to content

Commit

Permalink
[Discord] Broaden audio pause command permission to administrators
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Nov 20, 2023
1 parent 5ba18f1 commit 01e6822
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Discord/cogs/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ async def leave(self, ctx):
name = "pause", aliases = ["stop"], with_app_command = False
)
@checks.is_voice_connected()
@commands.check_any(checks.is_permitted(), checks.is_guild_owner())
@commands.check_any(
checks.is_permitted(), commands.has_permissions(administrator = True),
commands.is_owner()
)
async def audio_pause(self, ctx):
'''Pause the current song'''
# Note: pause command invokes this command
Expand All @@ -331,7 +334,10 @@ async def audio_pause(self, ctx):

@commands.command(aliases = ["stop"])
@checks.is_voice_connected()
@commands.check_any(checks.is_permitted(), checks.is_guild_owner())
@commands.check_any(
checks.is_permitted(), commands.has_permissions(administrator = True),
commands.is_owner()
)
async def pause(self, ctx):
'''Pause the current song'''
if command := ctx.bot.get_command("audio pause"):
Expand Down

0 comments on commit 01e6822

Please sign in to comment.