mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Fix
This commit is contained in:
@@ -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!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user