Move defer reply on reroll command

This commit is contained in:
Ethan Lane 2024-01-21 13:40:06 +00:00
parent 10806bd0f1
commit 891e013e37

View file

@ -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);