discord.py嵌入YouTube视频而不仅仅是粘贴链接 [英] discord.py embed youtube video without just pasting link

查看:66
本文介绍了discord.py嵌入YouTube视频而不仅仅是粘贴链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在玩discord.py机器人,目前(我)已经完成了几乎所有需要的工作,但是我一辈子都无法弄清楚如何使用Embed嵌入YouTube视频().

I am playing around with a discord.py bot, I have pretty much everything working that I need (at this time), but I can't for the life of me figure out how to embed a YouTube video using Embed().

我真的没有任何代码可以说出来,因为它们都无法正常工作.

I don't really have any code to post per-say, as none of it has worked correctly.

注意:我尝试在任何地方(此处+网络)进行搜索,我发现了很多有关嵌入图像的信息,效果很好.

Note: I've tried searching everywhere (here + web), I see plenty of info on embedding images which works great.

我确实在用于嵌入视频的discord API以及discord.py的API文档中看到了详细信息;但尚无明确的示例.

I do see detail in the discord API for embedding video, as well as the API Documentation for discord.py; but no clear example of how to pull it off.

我正在使用命令(我正在作为齿轮工作的模块)

I am using commands (the module I am working on as a cog)

任何帮助将不胜感激.

环境:

  • Discord.py版本:0.16.11
  • Python:3.5.2
  • 平台:OS X
  • VirtualEnv:是

推荐答案

不幸的是,您所要求的是不可能的,因为Discord API不允许您在嵌入中设置自定义视频.

What you are asking for is unfortunately impossible, since Discord API does not allow you to set custom videos in embeds.

这篇关于discord.py嵌入YouTube视频而不仅仅是粘贴链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆