【问题标题】:How do you edit an embed's Thumbnail in Discord.js?如何在 Discord.js 中编辑嵌入的缩略图?
【发布时间】:2020-05-26 21:15:10
【问题描述】:

我似乎不知道如何编辑嵌入的缩略图?有人可以帮忙吗?

我尝试过的:

const blaBla = new Discord.RichEmbed()
    .setThumbnail("some link that I added here");

message.channel.fetchMessage("My_Message_ID)")
    .then(message => message.edit(blaBla));

在这样做并执行该代码之后,消息没有更新,有什么原因吗?

【问题讨论】:

  • 您在发布消息的同一频道中使用它?
  • @Cipher 是的~我试过了 :(
  • 承诺消息返回消息?

标签: node.js discord.js


【解决方案1】:

如果你的 discord.js 版本是 v12.0,你应该这样做

message.channel.messages.fetch({around: "352292052538753025", limit: 1})
  .then(messages => {
    messages.first().edit("This fetched message was edited");
  });

【讨论】:

  • message.channel.messages.fetch('352292052538753025').then(m => m.edit(...))
猜你喜欢
  • 1970-01-01
  • 2020-11-02
  • 2023-03-29
  • 2021-06-15
  • 1970-01-01
  • 1970-01-01
  • 2021-07-01
  • 2020-08-03
  • 1970-01-01
相关资源
最近更新 更多