diff --git a/package.json b/package.json index 34c81c9..15beee9 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "dependencies": { "@discordjs/collection": "^1.5.1", "@discordjs/rest": "^1.7.1", - "@navy.gif/logger": "^2.5.3", + "@navy.gif/logger": "^2.5.4", "@navy.gif/timestring": "^6.0.6", "@types/node": "^18.15.11", "chalk": "^5.3.0", diff --git a/src/middleware/Controller.ts b/src/middleware/Controller.ts index b4e94d3..66261cf 100644 --- a/src/middleware/Controller.ts +++ b/src/middleware/Controller.ts @@ -49,7 +49,7 @@ class Controller extends EventEmitter // Sharding const respawn = process.env.NODE_ENV !== 'development'; const clientPath = path.join(options.rootDir, 'client/DiscordClient.js'); - if (!existsSync(clientPath)) + if (!existsSync(clientPath)) throw new Error(`Client path does not seem to exist: ${clientPath}`); this.#options = options; @@ -73,7 +73,7 @@ class Controller extends EventEmitter // Other this.#slashCommandManager = new SlashCommandManager(this); - this.#logger = new MasterLogger(options.logger); + this.#logger = new MasterLogger({ ...options.logger, webhook: { url: process.env.ERROR_WEBHOOK_URL } }); this.#metrics = new Metrics(this); // this.#apiClientUtil = new ApiClientUtil(this); diff --git a/yarn.lock b/yarn.lock index 8e6b2db..2503928 100644 --- a/yarn.lock +++ b/yarn.lock @@ -931,23 +931,23 @@ __metadata: languageName: node linkType: hard -"@navy.gif/discord-webhook@npm:^1.0.0": - version: 1.2.0 - resolution: "@navy.gif/discord-webhook@npm:1.2.0" +"@navy.gif/discord-webhook@npm:^1.2.5": + version: 1.2.5 + resolution: "@navy.gif/discord-webhook@npm:1.2.5" dependencies: node-fetch: 2 - checksum: a993e641cbe02b9397237902844649e003abd54de90e210ffc331d916dd5d1e0514abff2f92d4051f2e96d3655f83d7d4dd6677465c266cf192301ddaf818f8c + checksum: bc1b30316dba362a4665c44507974048fb24b11d27ebc0769857d49defc8ef3c1da1fc76aa7443f2d433fa9ca5880a992a7406ba6f0cbc2da683b5b276b23674 languageName: node linkType: hard -"@navy.gif/logger@npm:^2.5.3": - version: 2.5.3 - resolution: "@navy.gif/logger@npm:2.5.3" +"@navy.gif/logger@npm:^2.5.4": + version: 2.5.4 + resolution: "@navy.gif/logger@npm:2.5.4" dependencies: - "@navy.gif/discord-webhook": ^1.0.0 + "@navy.gif/discord-webhook": ^1.2.5 chalk: ^4.1.2 moment: ^2.29.4 - checksum: 0936998e000f55dbe573db27b25f82fc02c4f906abb6f933634622f99e11035bf6f5f37047421d55db19a54e67a6f8f59962c60353862954f629c9dd79ff846d + checksum: 5081366171f84c4eaaead31562282a4056e84d601790f797ea2c857e582f66f15d009a6bcc576c5d6988063ce973e215c329fddc967acdf1d195971f6e7ba74e languageName: node linkType: hard @@ -4087,7 +4087,7 @@ __metadata: dependencies: "@discordjs/collection": ^1.5.1 "@discordjs/rest": ^1.7.1 - "@navy.gif/logger": ^2.5.3 + "@navy.gif/logger": ^2.5.4 "@navy.gif/timestring": ^6.0.6 "@types/common-tags": ^1.8.1 "@types/humanize-duration": ^3.27.1