Skip to content

Commit

Permalink
[Discord] Broaden audio tts 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 fa2f61f commit cf1bf6c
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 @@ -653,7 +653,10 @@ async def audio_text(

@audio.command(name = "tts")
@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_tts(
self, ctx,
amplitude: Optional[commands.Range[int, 0, 1000]] = 100, # noqa: UP007 (non-pep604-annotation)
Expand Down Expand Up @@ -703,7 +706,10 @@ async def audio_tts(

@commands.command()
@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 tts(
self, ctx,
amplitude: Optional[commands.Range[int, 0, 1000]] = 100, # noqa: UP007 (non-pep604-annotation)
Expand Down

0 comments on commit cf1bf6c

Please sign in to comment.