Fix dropnumber and droprarity commands
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ethan Lane 2023-12-29 22:12:04 +00:00
parent e05059cb9b
commit fb874be76a
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ export default class Dropnumber extends Command {
const imageFileName = card.path.split("/").pop()!; const imageFileName = card.path.split("/").pop()!;
try { try {
image = readFileSync(path.join(process.cwd(), 'cards', card.path)); image = readFileSync(path.join(process.env.DATA_DIR!, 'cards', card.path));
} catch { } catch {
await interaction.reply(`Unable to fetch image for card ${card.id}`); await interaction.reply(`Unable to fetch image for card ${card.id}`);
return; return;

View file

@ -50,7 +50,7 @@ export default class Droprarity extends Command {
const imageFileName = card.card.path.split("/").pop()!; const imageFileName = card.card.path.split("/").pop()!;
try { try {
image = readFileSync(path.join(process.cwd(), 'cards', card.card.path)); image = readFileSync(path.join(process.env.DATA_DIR!, 'cards', card.card.path));
} catch { } catch {
await interaction.reply(`Unable to fetch image for card ${card.card.id}`); await interaction.reply(`Unable to fetch image for card ${card.card.id}`);
return; return;