From 590eda8dc8fc71f943af056f88f8c1eb7b95b13d Mon Sep 17 00:00:00 2001 From: Mari Date: Sat, 4 May 2024 00:46:04 -0700 Subject: [PATCH] Fix one lingering-but-essential constant dataDir --- src/commands/base.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/commands/base.ts b/src/commands/base.ts index a988f66..0a53f5d 100644 --- a/src/commands/base.ts +++ b/src/commands/base.ts @@ -22,8 +22,6 @@ import { readFile } from 'fs/promises'; import { join } from 'path'; import { default as Sharp } from 'sharp'; -const dataDir = '../data'; - export const CharacterOptionTemplate = { name: 'character', description: 'The character(s) to operate on.', @@ -212,7 +210,7 @@ export abstract class AbstractCharacterStatusCommand extends SlashCommand { async loadCharacters(names: Iterable): Promise { return Promise.all( Array.from(names).map((name) => - loadCharacter(dataDir, name) + loadCharacter(this.dataDir, name) .then((c) => ({ name, success: true, originalData: c })) .catch((e) => ({ name, success: false, error: e })) )