This commit is contained in:
Dragon Fire
2021-06-07 18:10:13 -04:00
parent 01e20a1f16
commit 309d4669af
+5 -4
View File
@@ -62,11 +62,12 @@ module.exports = class TrueOrFalseCommand extends Command {
time: 15000 time: 15000
}); });
if (!interactions.size) return questionMsg.edit(`Sorry, time is up! It was ${correctBool}.`, { components: [] }); if (!interactions.size) return questionMsg.edit(`Sorry, time is up! It was ${correctBool}.`, { components: [] });
const ans = interactions.first().customID === 'true'; const ans = interactions.first();
if (correctBool !== ans) return questionMsg.edit(`Nope, sorry, it's ${correctBool}.`, { components: [] }); const ansBool = ans.customID === 'true';
return questionMsg.edit('Nice job! 10/10! You deserve some cake!', { components: [] }); if (correctBool !== ansBool) return ans.editReply(`Nope, sorry, it's ${correctBool}.`, { components: [] });
return ans.editReply('Nice job! 10/10! You deserve some cake!', { components: [] });
} catch (err) { } catch (err) {
return questionMsg.edit(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
} }
} }
}; };