Skip to content

Commit

Permalink
fix: use deferred replies for cert helper
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrone-sudeium committed Jan 4, 2024
1 parent 5b27caa commit 48492ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/features/ffxiv_certificate_helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class FFXIVCertificateFeature extends GlobalFeature {
await interaction.reply({content: `⚠️ \`${dc}\` is not a recognised data centre`, ephemeral: true})
return
}

await interaction.deferReply({ephemeral: true})
try {
const prices = await this.getPricesFromUniversalis(dc)
const embeds = prices.map((priceInfo, index) => {
Expand All @@ -103,10 +103,10 @@ export class FFXIVCertificateFeature extends GlobalFeature {
embed.setFooter({text: formatPriceInfo(priceInfo)})
return embed
})
interaction.reply({embeds, ephemeral: true})
interaction.editReply({embeds})
} catch(err) {
log(`ffxiv_certificate_helper error: ${err}`, "always")
interaction.reply({content: "oops something's cooked. check the logs", ephemeral: true})
interaction.editReply({content: "⚠️ Oops something's cooked. Check the logs."})
}
}

Expand Down

0 comments on commit 48492ed

Please sign in to comment.