From 48a633e308d85300161743f31d7e3526d7d7a418 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sun, 8 May 2022 21:22:24 +0300 Subject: [PATCH] listeners for ratelimit & invalid request warnings --- src/structure/DiscordClient.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/structure/DiscordClient.js b/src/structure/DiscordClient.js index 1a038bf..fb8db40 100644 --- a/src/structure/DiscordClient.js +++ b/src/structure/DiscordClient.js @@ -226,6 +226,14 @@ class DiscordClient extends Client { this.logger.status('Shard resumed.'); }); + this.eventHooker.hook('invalidRequestWarning', (warning) => { + this.logger.warn(`Invalid requests warning:\n${inspect(warning)}`); + }); + + this.eventHooker.hook('rateLimit', (limit) => { + this.logger.debug(`Client hit a rate limit:\n${inspect(limit)}`); + }); + } /**