Skip to content

Commit 5b5dcff

Browse files
author
Akhil Pillai
committed
update recache timeout
1 parent 5f7cb0b commit 5b5dcff

File tree

3 files changed

+83
-94
lines changed

3 files changed

+83
-94
lines changed

package-lock.json

+73-84
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
{
22
"author": "Akhil Pillai",
33
"dependencies": {
4+
"@discordjs/collection": "^2.1.1",
45
"discord.js": "^14.16.3",
56
"dotenv": "^16.4.7",
67
"express": "^4.21.2",
78
"helmet": "^8.0.0",
89
"jsoning": "^1.0.1",
910
"luxon": "^3.5.0",
1011
"node-schedule": "^2.1.1",
11-
"pino": "^9.5.0",
12+
"pino": "^9.6.0",
1213
"pino-pretty": "^13.0.0"
1314
},
1415
"devDependencies": {
1516
"@types/express": "^5.0.0",
1617
"@types/luxon": "^3.4.2",
1718
"@types/node-schedule": "^2.1.7",
18-
"@typescript-eslint/eslint-plugin": "^8.18.1",
19-
"@typescript-eslint/parser": "^8.18.1",
20-
"knip": "^5.41.0",
21-
"npm-check-updates": "^17.1.11",
19+
"@typescript-eslint/eslint-plugin": "^8.18.2",
20+
"@typescript-eslint/parser": "^8.18.2",
21+
"knip": "^5.41.1",
22+
"npm-check-updates": "^17.1.12",
2223
"prettier": "^3.4.2",
2324
"tsx": "^4.19.2",
2425
"typescript": "^5.7.2"

src/index.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { argv, stdout } from 'process';
1414
import { dirname, join } from 'path';
1515
import { fileURLToPath } from 'url';
1616
import { readdir, rm } from 'fs/promises';
17-
import { Jsoning } from 'jsoning';
17+
import { Jsoning, JSONValue } from 'jsoning';
1818
import { DevIds, permissionsBits, PORT } from './config';
1919
import { Command, CommandClient, createServer, logger, Methods } from './lib';
2020
import { scheduleJob } from 'node-schedule';
@@ -135,8 +135,7 @@ for (const file of commandFiles) {
135135
if (command.help)
136136
await cmndb.set(
137137
command.data.name,
138-
// @ts-expect-error types
139-
command.help.toJSON()
138+
command.help.toJSON() as unknown as JSONValue
140139
);
141140
}
142141
client.commands.freeze();
@@ -216,8 +215,8 @@ process.on('uncaughtException', sendError);
216215
process.on('unhandledRejection', sendError);
217216
logger.debug('Set up error handling.');
218217

219-
// refresh cached kumilinwa spec every hour
220-
scheduleJob('0 * * * *', refreshCachedLangSpec);
218+
// refresh cached language specification every 5 minutes
219+
scheduleJob('*/5 * * * *', refreshCachedLangSpec);
221220

222221
logger.info('Process setup complete.');
223222

0 commit comments

Comments
 (0)