Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Jul 5, 2024
1 parent 25dfe33 commit f7ae74b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async function handleCreatables() {

async function handleCommandsJSON() {
const currentFileHash = getFileHash(`./src/lib/data/${BOT_TYPE}.commands.json`);
if (currentCache.commandsHash !== currentFileHash || forceRebuild) {
if (currentCache.commandsHash !== currentFileHash) {
console.log(' Updating commands json file');
const { commandsFile } = await import('./renderCommandsFile');
await commandsFile();
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/renderCommandsFile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import './no-prisma';

import { execSync } from 'node:child_process';
import { writeFileSync } from 'node:fs';
import { stringMatches } from '@oldschoolgg/toolkit';
import { ApplicationCommandOptionType } from 'discord.js';
Expand Down Expand Up @@ -49,4 +50,5 @@ export async function commandsFile() {
const commands = await renderCommands();
const path = `./src/lib/data/${BOT_TYPE.toLowerCase()}.commands.json`;
writeFileSync(path, `${JSON.stringify(commands, null, ' ')}\n`);
execSync(`npx biome check --write ${path}`);
}

0 comments on commit f7ae74b

Please sign in to comment.