Browse Source

Use embed for message override

pull/9/head
Abheek Dhawan 4 years ago
parent
commit
2978e42b17
  1. 7
      bot/awesomescibo.js

7
bot/awesomescibo.js

@ -184,8 +184,13 @@ async function otherCommands(message) {
answerMsg.reply(msgToReply) answerMsg.reply(msgToReply)
); );
} else { } else {
const overrideEmbed = new Discord.MessageEmbed()
.setAuthor(answerMsg.author.tag, answerMsg.author.displayAvatarURL())
.setField("Correct answer", `\`${data.tossup_answer}\``)
.setDescription(`It seems your answer was incorrect. Please react with <:override:842778128966615060> to override your answer if you think you got it right.`)
.setTimestamp();
const overrideMsg = 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.` overrideEmbed
) )
.then(overrideMsg => { .then(overrideMsg => {
overrideMsg.react("<:override:842778128966615060>"); overrideMsg.react("<:override:842778128966615060>");

Loading…
Cancel
Save