python - 如何使用 Discord.py Rewrite (1.0.0) 版本播放音乐
问题描述
我正在使用 discord.py rewrite 来制作一个不和谐的机器人。我知道这一切都写在文档中,但是文档真的很混乱。我想要一个机器人连接到我的频道,然后从 youtube 链接播放音乐。
我目前有这个:
@client.event
async def on_message(message):
if(message.content == "play playlist"):
# some code to play link that I have in local file
同样,文档对我来说非常混乱和不清楚。
如果您需要更多信息,请发表评论。
谢谢!
解决方案
推荐阅读
- java - 用户是否可以授予应用程序权限,以便应用程序可以在需要时让设备可被发现?
- maven - Maven类污染?
- android - 使应用程序在手机屏幕上工作并在应用程序内编辑屏幕截图
- php - 在laravel中以自定义格式返回验证器响应?
- android - 为什么 Firebase 和 Google Analytics 指标不匹配?
- python - 在pygame中添加按钮并说颜色“绿色”是未定义的变量
- google-chrome - 当扩展程序在单独的窗口中启动时,从 Chrome 扩展程序向内容脚本发送消息
- deep-learning - 如何使用 pytorch 从 Resnet 获取概率?
- kotlin - Kotlin 中相同的属性名称和主构造函数参数名称
- amazon-web-services - CloudFormation - 在禁用状态下创建 SNS 订阅