每当用户在我的音乐机器人中发送消息时,它只接收第一个单词.我希望它取整首歌的名字



每当我键入消息时,例如"。玩永远不会放弃你";,我的代码只接受"之后的第一个单词;。播放";,那将是";从不";。我需要解决这个问题,但我不知道

@client.command()
async def play(ctx, url):
search_keyword = add(url)
print(url)
html = urllib.request.urlopen("https://www.youtube.com/results?search_query=" + search_keyword)
video_ids = re.findall(r"watch?v=(S{11})", html.read().decode())
link = "https://www.youtube.com/watch?v=" + video_ids[0]
print(link)
YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
FFMPEG_OPTIONS = {
'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
voice = get(client.voice_clients, guild=ctx.guild)
if not voice.is_playing():
with YoutubeDL(YDL_OPTIONS) as ydl:
info = ydl.extract_info(link, download=False)
URL = info['url']
voice.play(FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))
voice.is_playing()

好了,简单明了。现在,以下所有输入都将成为url变量的一部分。

async def play(ctx, *, url):