Bypass cache when ANI passed to LRN command:
This commit is contained in:
parent
5520234055
commit
49357220de
2
index.js
2
index.js
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue