diff --git a/index.js b/index.js index 81a9505..ba95ea2 100644 --- a/index.js +++ b/index.js @@ -68,7 +68,7 @@ Client.on("interactionCreate", async (interaction) => { } else { cached = {} } - if (!cached.cnam || cached?.timestamp > new Date()) { + if (!cached.cnam || new Date() > new Date(cached?.expires)) { // Old, get from API interaction.reply({ephemeral: show, content: `<:checking:1305271116134092842> Looking up \`${number}\``}).then(() => { axios.get(process.env.API_URL.replaceAll("%n", number)).then((response) => {