Node.js Bot将其删除';s的反应,而不是用户';s
所以我需要做一个简单但有效的票务系统。我希望它是一个基于反应的票证创建,所以,我写了一些代码Node.js Bot将其删除';s的反应,而不是用户';s,node.js,discord,discord.js,Node.js,Discord,Discord.js,所以我需要做一个简单但有效的票务系统。我希望它是一个基于反应的票证创建,所以,我写了一些代码 if(message.author.bot) return; message.channel.messages.fetch("774594578505400340").then(m =>{ //when i send a message the bot m.react("<a:tick:774591862760800277
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)
});
if(message.author.bot)返回;
message.channel.messages.fetch(“77459457850540340”)。然后(m=>{//当我向bot发送消息时
m、 反应(”
但是当我通过在终端中单击Ctrl+C并再次键入node.js来重新启动它时
机器人会删除它的反应,而不是我的这不是一种正常类型的错误。检查并查看您是否正确保存了文件,并且没有运行2次。这是一种奇怪的错误。这不是答案。请查看此处的回答问题指南