refactor(commands/voice/queue): allow query with spaces
This commit is contained in:
parent
a8d69e079d
commit
3ca58a4c19
@ -22,7 +22,7 @@ async def queue_or_play(message, edited=False):
|
|||||||
parser = arguments.ArgumentParser(
|
parser = arguments.ArgumentParser(
|
||||||
tokens[0], "queue a song, list the queue, or resume playback"
|
tokens[0], "queue a song, list the queue, or resume playback"
|
||||||
)
|
)
|
||||||
parser.add_argument("query", nargs="?", help="yt-dlp URL or query to get song")
|
parser.add_argument("query", nargs="*", help="yt-dlp URL or query to get song")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--volume",
|
"--volume",
|
||||||
@ -155,7 +155,7 @@ async def queue_or_play(message, edited=False):
|
|||||||
try:
|
try:
|
||||||
async with message.channel.typing():
|
async with message.channel.typing():
|
||||||
player = await youtubedl.YTDLSource.from_url(
|
player = await youtubedl.YTDLSource.from_url(
|
||||||
query, loop=client.loop, stream=True
|
" ".join(query), loop=client.loop, stream=True
|
||||||
)
|
)
|
||||||
player.volume = float(args.volume) / 100.0
|
player.volume = float(args.volume) / 100.0
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user