From fb874be76af6a91751fe12d44b8ae1107bb1ed3a Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 29 Dec 2023 22:12:04 +0000 Subject: [PATCH] Fix dropnumber and droprarity commands --- src/commands/stage/dropnumber.ts | 2 +- src/commands/stage/droprarity.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/stage/dropnumber.ts b/src/commands/stage/dropnumber.ts index a7de021..ddb53b1 100644 --- a/src/commands/stage/dropnumber.ts +++ b/src/commands/stage/dropnumber.ts @@ -47,7 +47,7 @@ export default class Dropnumber extends Command { const imageFileName = card.path.split("/").pop()!; try { - image = readFileSync(path.join(process.cwd(), 'cards', card.path)); + image = readFileSync(path.join(process.env.DATA_DIR!, 'cards', card.path)); } catch { await interaction.reply(`Unable to fetch image for card ${card.id}`); return; diff --git a/src/commands/stage/droprarity.ts b/src/commands/stage/droprarity.ts index efe431f..b3e3bb7 100644 --- a/src/commands/stage/droprarity.ts +++ b/src/commands/stage/droprarity.ts @@ -50,7 +50,7 @@ export default class Droprarity extends Command { const imageFileName = card.card.path.split("/").pop()!; try { - image = readFileSync(path.join(process.cwd(), 'cards', card.card.path)); + image = readFileSync(path.join(process.env.DATA_DIR!, 'cards', card.card.path)); } catch { await interaction.reply(`Unable to fetch image for card ${card.card.id}`); return;