From 5ba18f1eec324ef7cd31e16201a4a8ae5176e4df Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 20 Nov 2023 17:38:38 -0600 Subject: [PATCH] [Discord] Broaden audio command permission to administrators --- Discord/cogs/audio.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Discord/cogs/audio.py b/Discord/cogs/audio.py index 6e29c33136..1509574a9d 100644 --- a/Discord/cogs/audio.py +++ b/Discord/cogs/audio.py @@ -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 @@ -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 @@ -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