Skip to content

Commit

Permalink
[Discord] Broaden audio 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 7cee6d0 commit 5ba18f1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Discord/cogs/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ async def cog_check(self, ctx):
case_insensitive = True,
fallback = "play"
)
@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(self, ctx, *, query: str):
'''
Play audio
Expand Down Expand Up @@ -111,7 +114,10 @@ async def audio(self, ctx, *, query: str):
await response.edit(embed = embed)

@commands.group(case_insensitive = True, invoke_without_command = True)
@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 spotify(self, ctx, *, query: str):
'''
Play audio
Expand Down Expand Up @@ -150,7 +156,10 @@ async def spotify_information(self, ctx, url: str):
@commands.hybrid_group(
aliases = ["yt"], case_insensitive = True, with_app_command = False
)
@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 youtube(self, ctx, *, query: str):
'''
Play audio
Expand Down

0 comments on commit 5ba18f1

Please sign in to comment.