我让我的机器人尝试在某个不繁忙的通道上删除超过.createdTimestamp 7小时的消息,但是我不知道如何在discord.js v12.2.0中实现这一点
发布于 2020-04-26 06:43:38
.createdTimestamp将很难使用,消息的时间戳是雪花数据类型,这很难转换和使用请参阅this。有一个更简单的解决方案:
发送消息时,将删除功能的超时时间设置为7小时(毫秒):
msg.channel.send("message to be deleted").then(msg => {
msg.delete({timeout: 25200000})
})
.catch("something went wrong");
}https://stackoverflow.com/questions/61433118
复制相似问题