Skip to content

Commit

Permalink
package bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsundso committed Feb 2, 2025
1 parent b59802b commit 969312e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@
"postinstall": "mkdir -p ./logs",
"lint": "npx eslint 'src/**/*.ts' --fix",
"register": "node ./dist/register-commands.js",
"register-dev": "node ./dist/register-commands-dev.js",
"run": "node --max-old-space-size=10240 --no-deprecation --no-warnings --experimental-json-modules ./dist/index.js",
"start": "pnpx prisma generate && pnpx prisma db push && pnpm run run",
"watch": "swc src -d dist --strip-leading-paths --copy-files --watch"
},
"dependencies": {
"@discordjs/core": "^2.0.1",
"@discordjs/rest": "^2.4.2",
"@prisma/client": "^6.2.1",
"@prisma/client": "^6.3.0",
"@total-typescript/ts-reset": "^0.6.1",
"@types/lodash": "^4.17.14",
"@types/lodash": "^4.17.15",
"@types/lodash.merge": "^4.6.9",
"captcha-canvas": "^2.3.1",
"client@latest": "link:prisma/client@latest",
"discord-api-types": "0.37.115",
"discord-api-types": "0.37.118",
"discord-hybrid-sharding": "^2.2.4",
"discord.js": "^14.17.3",
"dotenv": "^16.4.7",
Expand All @@ -44,32 +45,32 @@
"@babel/eslint-parser": "^7.26.5",
"@babel/eslint-plugin": "^7.25.9",
"@swc/cli": "^0.6.0",
"@swc/core": "1.10.7",
"@swc/core": "1.10.12",
"@types/body-parser": "^1.19.5",
"@types/clone": "^2.1.4",
"@types/glob": "^8.1.0",
"@types/lodash.clonedeep": "^4.5.9",
"@types/moment-duration-format": "^2.2.6",
"@types/ms": "^0.7.34",
"@types/node": "^22.10.6",
"@types/ms": "^2.1.0",
"@types/node": "^22.13.0",
"@types/node-schedule": "^2.1.7",
"@types/request": "^2.48.12",
"@types/source-map-support": "^0.5.10",
"@types/string-similarity": "^4.0.2",
"@types/valid-url": "^1.0.7",
"@types/ws": "^8.5.13",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"@types/ws": "^8.5.14",
"@typescript-eslint/eslint-plugin": "^8.22.0",
"@typescript-eslint/parser": "^8.22.0",
"eslint": "^8.57.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^10.0.1",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-json": "^4.0.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-prettier": "^5.2.3",
"prettier": "^3.4.2",
"prisma": "^6.2.1",
"prisma": "^6.3.0",
"source-map-support": "^0.5.21",
"typescript": "^5.7.3"
},
Expand Down
6 changes: 3 additions & 3 deletions src/BaseClient/UtilModules/getDuration.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ms from 'ms';
import ms, { type StringValue } from 'ms';

/**
* Calculates the total duration of a given time string.
Expand All @@ -12,7 +12,7 @@ export default (duration: string, max?: number) => {
const mergedDurationArgs: string[] = [];

for (let i = 0; i < args.length; i += 1) {
if (Number(args[i]) === ms(args[i])) {
if (Number(args[i]) === ms(args[i] as StringValue)) {
mergedDurationArgs.push(`${args[i]} ${args[i + 1]}`);
i += 1;
break;
Expand All @@ -22,7 +22,7 @@ export default (duration: string, max?: number) => {
}

const result = mergedDurationArgs
.map((arg) => ms(arg))
.map((arg) => ms(arg as StringValue))
.reduce((partialSum, arg) => partialSum + arg, 0);

if (max && Math.abs(result) > max) return max;
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/ModalCommands/settings/autoModRule/duration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Discord from 'discord.js';
import ms from 'ms';
import ms, { type StringValue } from 'ms';
import * as CT from '../../../../Typings/Typings.js';
import { getAPIRule } from '../../../ButtonCommands/settings/autoModRule/boolean.js';
import * as SettingsFile from '../../../SlashCommands/settings/moderation/denylist-rules.js';
Expand All @@ -23,7 +23,7 @@ export default async (cmd: Discord.ModalSubmitInteraction, args: string[]) => {
const verify = (): Promise<{ value?: number; error?: Error }> =>
new Promise((res) => {
try {
ms(field.value);
ms(field.value as StringValue);
res({ value: cmd.client.util.getDuration(field.value) / 1000 });
} catch (e) {
res({ error: e as Error });
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/ModalCommands/settings/duration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type * as Discord from 'discord.js';
import ms from 'ms';
import ms, { type StringValue } from 'ms';
import * as CT from '../../../Typings/Typings.js';

export default async (cmd: Discord.ModalSubmitInteraction, args: string[]) => {
Expand All @@ -22,7 +22,7 @@ export default async (cmd: Discord.ModalSubmitInteraction, args: string[]) => {
const verify = (): Promise<{ value?: number; error?: Error }> =>
new Promise((res) => {
try {
ms(field.value);
ms(field.value as StringValue);
res({ value: cmd.client.util.getDuration(field.value) / 1000 });
} catch (e) {
res({ error: e as Error });
Expand Down

0 comments on commit 969312e

Please sign in to comment.