【发布时间】:2017-08-19 09:41:09
【问题描述】:
所以,我的问题是如何将变量 url 设置为某人在 yt 之后键入的内容?例如!yt [youtbube link] makes url = [youtube link]
这是我目前的代码,感谢任何帮助
@client.command(pass_context=True)
async def yt(ctx):
url = 'https://www.youtube.com/watch?v=rPOUewuNKFE'
author = ctx.message.author
voice_channel = author.voice_channel
vc = await client.join_voice_channel(voice_channel)
player = await vc.create_ytdl_player(url)
player.start()
【问题讨论】:
-
这段代码有什么问题(修复缩进后)?
-
代码没有任何问题,我只是不知道如何让它播放某人在 !yt 之后放置的链接,我把我的代码放在这里只是为了让人们可以看到我拥有的东西。跨度>
标签: python python-3.x youtube bots discord.py