【发布时间】:2020-12-16 21:08:48
【问题描述】:
我正在编写一个机器人,我想从某个时间开始实时倒计时。我得到了正确的时间,但我有一个问题。我无法编辑消息以显示剩余时间。这是我目前的代码:
module.exports.run = async (client, message, args) => {
let time = client.db.get(`time`)
const exampleEmbed = new Discord.MessageEmbed()
.setColor('#ff74fc')
.setTitle('V2 Release Time')
.setDescription('This command will be showing the countdown until the V2 cafe releases! ')
.setThumbnail('https://media.discordapp.net/attachments/708130362122829876/746736868124524584/image0.jpg')
.addFields(
{ name: 'Time', value: `${time} Seconds Left!` },
)
.setTimestamp()
.setFooter('Flamgo Bot');
return message.channel.send(exampleEmbed)
const Edit = new Discord.MessageEmbed()
.addFields(
{ name: 'Time', value: `${time} Seconds Left!` },
)
message.edit(Edit)
}
module.exports.help = {
name: "v2time"
};
如果有人可以提供帮助,那将很有帮助。谢谢。
【问题讨论】:
标签: node.js discord.js embed