From 295aabce822318e8a2af389b3f5773cb05279121 Mon Sep 17 00:00:00 2001 From: calico32 Date: Sun, 28 Jan 2024 19:30:29 -0500 Subject: [PATCH] fix some stuff no idea --- .eslintrc.json | 2 +- .gitignore | 2 ++ scripts/build.js | 9 +++++---- src/client/extensions/deploy.ts | 1 - src/commands/utility/timestamp.ts | 2 +- tsconfig.json | 5 +++-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 0efa4b2..dd59009 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "plugin:import/recommended", "plugin:import/typescript" ], - "ignorePatterns": ["dist/*", "types/gamerbot.d.ts", "scripts/*", "data/*"], + "ignorePatterns": ["dist/*", "types/gamerbot.d.ts", "scripts/*", "data/*", "test/*"], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2021, diff --git a/.gitignore b/.gitignore index 0275b32..3677f08 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,5 @@ yarn-error.log* /example/storage /logs + +/test diff --git a/scripts/build.js b/scripts/build.js index e41c17b..ba22d28 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -54,10 +54,11 @@ const options = { assets: './dist/**', }, release: releaseName, - finalize: true, - deploy: { - env: argv.production ? 'production' : 'development', - }, + + // finalize: true, + // deploy: { + // env: argv.production ? 'production' : 'development', + // }, }), ].filter(Boolean), } diff --git a/src/client/extensions/deploy.ts b/src/client/extensions/deploy.ts index 650bbb8..de17fd7 100644 --- a/src/client/extensions/deploy.ts +++ b/src/client/extensions/deploy.ts @@ -66,7 +66,6 @@ export default class DeployExtension extends ClientExtension { }) ) - // @ts-expect-error commands = _.sortBy(commands, 'name') let existing = [...(await commandManager.fetch({})).values()].map((c) => ({ diff --git a/src/commands/utility/timestamp.ts b/src/commands/utility/timestamp.ts index 54fdc2e..01ccf7c 100644 --- a/src/commands/utility/timestamp.ts +++ b/src/commands/utility/timestamp.ts @@ -62,7 +62,7 @@ const COMMAND_TIMESTAMP = command(ApplicationCommandType.ChatInput, { description: `${getDateStringFromSnowflake(id).join('; ')}\n${time(seconds, 'F')}`, }) - embed.setFooter({ text: date.toISO({ includeOffset: true }) }) + embed.setFooter({ text: date.toISO({ includeOffset: true })! }) await interaction.reply({ embeds: [embed] }) diff --git a/tsconfig.json b/tsconfig.json index abc6952..c1e336f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "exclude": ["node_modules", "**/node_modules/*", "types/gamerbot.d.ts"], - "include": ["src", "scripts", "types", "lib", "src/types/*.d.ts", "scripts"], + "include": ["src", "scripts", "types", "lib", "src/types/*.d.ts", "scripts", "test"], "compilerOptions": { "checkJs": true, "module": "esnext", @@ -12,10 +12,11 @@ "resolveJsonModule": true, "useUnknownInCatchVariables": false, "forceConsistentCasingInFileNames": true, - "moduleResolution": "nodenext", + "moduleResolution": "bundler", "esModuleInterop": true, "sourceMap": true, "skipDefaultLibCheck": true, + "downlevelIteration": true, "skipLibCheck": true, "declaration": true, "baseUrl": "gamerbot",