diff --git a/src/buttonEvents/Reroll.ts b/src/buttonEvents/Reroll.ts index a647acd..e0d0a0b 100644 --- a/src/buttonEvents/Reroll.ts +++ b/src/buttonEvents/Reroll.ts @@ -28,11 +28,11 @@ export default class Reroll extends ButtonEvent { } try { + await interaction.deferReply(); + const image = readFileSync(path.join(process.env.DATA_DIR!, "cards", randomCard.card.path)); const imageFileName = randomCard.card.path.split("/").pop()!; - await interaction.deferReply(); - const attachment = new AttachmentBuilder(image, { name: imageFileName }); const inventory = await Inventory.FetchOneByCardNumberAndUserId(interaction.user.id, randomCard.card.id);