Fix drop command not replying to the user on image read failure
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
486826470a
commit
67b15a5c7a
1 changed files with 2 additions and 2 deletions
|
@ -36,11 +36,11 @@ export default class Drop extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
const image = readFileSync(path.join(process.env.DATA_DIR!, "cards", randomCard.card.path));
|
const image = readFileSync(path.join(process.env.DATA_DIR!, "cards", randomCard.card.path));
|
||||||
const imageFileName = randomCard.card.path.split("/").pop()!;
|
const imageFileName = randomCard.card.path.split("/").pop()!;
|
||||||
|
|
||||||
await interaction.deferReply();
|
|
||||||
|
|
||||||
const attachment = new AttachmentBuilder(image, { name: imageFileName });
|
const attachment = new AttachmentBuilder(image, { name: imageFileName });
|
||||||
|
|
||||||
const inventory = await Inventory.FetchOneByCardNumberAndUserId(interaction.user.id, randomCard.card.id);
|
const inventory = await Inventory.FetchOneByCardNumberAndUserId(interaction.user.id, randomCard.card.id);
|
||||||
|
|
Loading…
Reference in a new issue