Skip to content

Commit

Permalink
Update validate-slash_commands.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Dec 15, 2024
1 parent 5916ba4 commit 3417867
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/scripts/validate-slash_commands.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { readFileSync, existsSync, readdirSync } from "fs";
import { join } from "path";
import { locales } from "../../index.js";

const baseDirectory = "./bot";
const conversionFile = "./bot/languages.json";

let foundErrors = false;

const nonChatInputCommands = ["initialReactor.json"];

try {
const conversionData = readFileSync(conversionFile, "utf8");
const languageMap = JSON.parse(conversionData);

Object.entries(languageMap).forEach(([key, value]) => {
Object.entries(locales).forEach(([key, value]) => {
value = value.code;
const directory = join(baseDirectory, value, "slash_commands");
if (!existsSync(directory)) {
Expand Down

0 comments on commit 3417867

Please sign in to comment.