【问题标题】:Discord Embeds -Adjusting ThumbnailDiscord 嵌入 - 调整缩略图
【发布时间】:2019-04-21 00:42:34
【问题描述】:

因此,您可以在嵌入中设置缩略图,但不幸的是它非常小。有没有办法调整位置和大小?

代码:

if (message.content === prefix + 'aot') {
   const embed = new RichEmbed()
     .setColor(0xFF0000)
     .setTitle("Attack on Titan")
     .setThumbnail("https://orig00.deviantart.net/f9ca/f/2013/145/9/b/shingeki_no_kyojin_render_v1_by_bryan1213-d66iwnc.png")
     .addField("Episodes:", "49")
     .addField("Genres:", "Action, Mystery, Drama")
     .addField("Story","Several hundred years ago, humans were nearly exterminated by titans. Titans are typically several stories tall, seem to have no intelligence, devour human beings and, worst of all, seem to do it for the pleasure rather than as a food source. A small percentage of humanity survived by walling themselves in a city protected by extremely high walls, even taller than the biggest of titans.")
     .setTimestamp();
     message.channel.send(embed);

【问题讨论】:

    标签: embed discord


    【解决方案1】:

    因为 discord 可在不同类型的设备(例如智能手机)上使用,所以它们在嵌入方面不允许进行太多自定义。嵌入的图像和文本内容被渲染以适合客户端,并且不能由发送者指定。 设置缩略图仅意味着指定图像的 URL,API 目前无法实现。

    【讨论】:

    • 感谢您的回答!!
    【解决方案2】:

    您可以改用.setImage("https://placekitten.com/700/500")

    【讨论】:

    • 谢谢!我只需要做embed.set_image(url=image_link)(注意 url= 部分)。
    • @aheze 你在用 Python 吗?我的回答与使用 Discord.js 的 JavaScript 有关。仍然很棒,它对您有所帮助。
    • 啊,是的,我正在使用 python...但是 setImage/set_image 正是我想要的,再次感谢
    猜你喜欢
    • 1970-01-01
    • 2020-09-20
    • 2017-04-25
    • 1970-01-01
    • 2011-11-19
    • 1970-01-01
    • 1970-01-01
    • 2010-11-22
    • 2012-01-06
    相关资源
    最近更新 更多