Bypass cache when ANI passed to LRN command:

This commit is contained in:
Christopher Cookman 2025-05-28 10:38:07 -06:00
parent 5520234055
commit 49357220de

View file

@ -130,7 +130,7 @@ Client.on("interactionCreate", async (interaction) => {
} else {
cached = {}
}
if (!cached.lrn || new Date() > new Date(cached?.expires)) {
if (!cached.lrn || new Date() > new Date(cached?.expires) || ani) {
// Old, get from API
interaction.reply({ ephemeral: showLrn, content: `<:checking:1305271116134092842> Looking up \`${did}\`` }).then(() => {
axios.get(process.env.LRN_API_URL.replaceAll("%did", did).replaceAll("%ani", ani || "")).then((response) => {