因此,我需要建立一个简单而有效的票务系统。我希望它是基于响应的故障单创建,所以,我写了一些代码
if(message.author.bot) return;
message.channel.messages.fetch("774594578505400340").then(m =>{ //when i send a message the bot
m.react("<a:tick:774591862760800277>"); //is gonna react to it but only
}) //if i send a message
})
client.on('messageReactionAdd', async (reaction, user) => {
if(user.bot) return; //if the reaction was added by a bot don't do anything
if (reaction.partial) {
try {
await reaction.fetch();
} catch (error) {
}
}
reaction.users.remove(user.id)
});
但是当我通过在终端中单击Ctrl + C并再次键入node.js来重新启动它时
机器人删除了它的反应,而不是我的
答案 0 :(得分:-1)
这不是正常的错误类型。检查并查看您是否正确保存了文件,并且文件没有运行2次。这是一种奇怪的错误。