【问题标题】:Edit Rich Embed with local image使用本地图像编辑 Rich Embed
【发布时间】:2021-01-15 07:33:27
【问题描述】:

快速提问:我什么时候做

const embed0 = new Discord.MessageEmbed()
  .setTitle("test1")
  
message.channel.send({embed: embed0}).then(msg => {
const attachment = new Discord
                      .MessageAttachment('./testimg.jpg', 'testimg.jpg');
const embed = new Discord.MessageEmbed()
     .setTitle('test')
     .attachFiles([attachment])
     .setImage('attachment://testimg.jpg');

msg.edit({files: ['./testimg.jpg'], embed: embed});
})

嵌入标题会更新,但图像不会更新。如果我将新嵌入作为它自己的嵌入发送,它可以工作。此外,如果我执行远程 url,它也会正确编辑。我该如何解决这个问题?

【问题讨论】:

    标签: node.js discord.js


    【解决方案1】:

    您只是无法编辑消息文件。这很可悲,但 Discord 尚未添加此功能。您可以投票以请求功能here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-09-27
      • 1970-01-01
      • 1970-01-01
      • 2018-08-29
      • 2011-08-22
      • 1970-01-01
      • 2022-07-04
      • 2011-07-07
      相关资源
      最近更新 更多