有人知道为什么我的机器人没有发送第二反应(B)并且当用户做出反应时他没有发送消息吗?
client.on("guildMemberAdd", member => {
try {
member.send(`Hello ${member}, welcome to the PotatoHost Server!
I want to help you and so my question is: Do you want to buy a server or do you need more informations first? \n
A: I want to buy a server
B: I need more informations first \n
Please react to this message with A or B.`)
.then(function (message) {
message.react("?")
message.react("?")
message.awaitReactions((reaction, user) => user.id == message.author.id && (reaction.emoji.name == '?' || reaction.emoji.name == '?'),
{ max: 1 }).then(collected => {
if (collected.first().emoji.name == '?') {
message.reply('Ok, so you want to buy a server. Let me recommend you to visit <#699374469977735208>.');
client.destroy();
}
else
message.reply('Ok, so you need more informations first. Let me recommend you to visit <#699374469977735208>.');
})
});
}
catch (err) {
console.log(err)
}
})
错误:
(node:29428) UnhandledPromiseRejectionWarning: DiscordjsError: Request to use token, but token was unavailable to the client.
at RequestHandler.execute (C:\Users\nicos\OneDrive\Documents\Discord Bots\PotatoHost Bot\node_modules\discord.js\src\rest\RequestHandler.js:107:21)
答案 0 :(得分:0)
令牌无效,因此漫游器无法正常启动