Add ESLint and fix issues #133
4 changed files with 4 additions and 4 deletions
|
@ -26,7 +26,7 @@ export default class CardMetadataFunction {
|
|||
private static async FindMetadataJSONs(): Promise<SeriesMetadata[]> {
|
||||
const res: SeriesMetadata[] = [];
|
||||
|
||||
const seriesJSONs = await glob(path.join(process.env.DATA_DIR!, 'cards', '/**/*.json'));
|
||||
const seriesJSONs = await glob(path.join(process.env.DATA_DIR!, "cards", "/**/*.json"));
|
||||
|
||||
for (const jsonPath of seriesJSONs) {
|
||||
console.log(`Reading file ${jsonPath}`);
|
||||
|
|
|
@ -40,7 +40,7 @@ Registry.RegisterCommands();
|
|||
Registry.RegisterEvents();
|
||||
Registry.RegisterButtonEvents();
|
||||
|
||||
if (!existsSync(`${process.env.DATA_DIR}/cards`) && process.env.GDRIVESYNC_AUTO && process.env.GDRIVESYNC_AUTO == 'true') {
|
||||
if (!existsSync(`${process.env.DATA_DIR}/cards`) && process.env.GDRIVESYNC_AUTO && process.env.GDRIVESYNC_AUTO == "true") {
|
||||
console.log("Card directory not found, syncing...");
|
||||
|
||||
CoreClient.AllowDrops = false;
|
||||
|
|
|
@ -47,7 +47,7 @@ export default class Dropnumber extends Command {
|
|||
const imageFileName = card.path.split("/").pop()!;
|
||||
|
||||
try {
|
||||
image = readFileSync(path.join(process.env.DATA_DIR!, '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;
|
||||
|
|
|
@ -50,7 +50,7 @@ export default class Droprarity extends Command {
|
|||
const imageFileName = card.card.path.split("/").pop()!;
|
||||
|
||||
try {
|
||||
image = readFileSync(path.join(process.env.DATA_DIR!, '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;
|
||||
|
|
Loading…
Reference in a new issue