Browse Source

React to bot's message instead of answer message

pull/9/head
Abheek Dhawan 4 years ago
parent
commit
85bad6e02b
  1. 10
      bot/awesomescibo.js

10
bot/awesomescibo.js

@ -184,17 +184,18 @@ async function otherCommands(message) {
answerMsg.reply(msgToReply)
);
} else {
answerMsg.react("<:override:842778128966615060>");
answerMsg.channel.send(
const overrideMsg = answerMsg.channel.send(
`It seems your answer was incorrect. The correct answer was **\`${data.tossup_answer}\`**. Please react with "<:override:842778128966615060>" to override your answer if you think you got it right.`
);
)
.then(overrideMsg => {
overrideMsg.react("<:override:842778128966615060>");
const filter = (reaction, user) => {
return (
["override"].includes(reaction.emoji.name) &&
user.id === answerMsg.author.id
);
};
answerMsg
overrideMsg
.awaitReactions(filter, {
max: 1,
time: 600000,
@ -205,6 +206,7 @@ async function otherCommands(message) {
answerMsg.reply(msgToReply)
);
});
})
}
})
.catch(console.error);

Loading…
Cancel
Save