listeners for ratelimit & invalid request warnings

This commit is contained in:
Erik 2022-05-08 21:22:24 +03:00
parent d3faf0e722
commit 48a633e308
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -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)}`);
});
}
/**