module.exports = {
data: new SlashCommandBuilder()
.setName('c')
.setDescription(''),
async execute(interaction) {
const data = await schema.findOne({
User: interaction.user.id
});
if (data.True) {
const currentTime = Date.now();
const totalTime = Math.floor((currentTime - data.prevTime) / 1000); //in seconds
console.log(data.prevTime, typeof data.prevTime, currentTime, typeof currentTime, totalTime);
}
}
Log: 1717422790267 number 1717424529146 number NaN