Skip to content

Commit

Permalink
[Discord] Change song to required parameter for audio command
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Nov 20, 2023
1 parent c428128 commit 8f02423
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Discord/cogs/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def cog_check(self, ctx):
fallback = "play"
)
@commands.check_any(checks.is_permitted(), checks.is_guild_owner())
async def audio(self, ctx, *, song: Optional[str]): #elif options[0] == "full":
async def audio(self, ctx, *, song: str):
'''
Audio System - play a song
All audio subcommands are also commands
Expand All @@ -73,9 +73,6 @@ async def audio(self, ctx, *, song: Optional[str]): #elif options[0] == "full":
raise RuntimeError(
"audo join command not found when audio command invoked"
)
if not song:
await ctx.embed_reply(":grey_question: What would you like to play?")
return
if "playlist" in song:
await self.players[ctx.guild.id].add_playlist(ctx, song)
return
Expand Down Expand Up @@ -110,7 +107,7 @@ async def audio(self, ctx, *, song: Optional[str]): #elif options[0] == "full":
description = "Supports [these sites](https://rg3.github.io/youtube-dl/supportedsites.html) and Spotify"
)
@commands.check_any(checks.is_permitted(), checks.is_guild_owner())
async def spotify(self, ctx, *, song: Optional[str]):
async def spotify(self, ctx, *, song: str):
'''
Audio System - play a song
All audio subcommands are also commands
Expand Down Expand Up @@ -141,7 +138,7 @@ async def spotify_information(self, ctx, url: str):
description = "Supports [these sites](https://rg3.github.io/youtube-dl/supportedsites.html) and Spotify",
)
@commands.check_any(checks.is_permitted(), checks.is_guild_owner())
async def youtube(self, ctx, *, song: Optional[str]):
async def youtube(self, ctx, *, song: str):
'''
Audio System - play a song
All audio subcommands are also commands
Expand Down

0 comments on commit 8f02423

Please sign in to comment.