Add rate limit logging
This commit is contained in:
parent
0a00be7a72
commit
57ed43b018
4 changed files with 67 additions and 0 deletions
|
@ -22,6 +22,7 @@ import { loadYamlSafely } from "./utils/loadYamlSafely";
|
|||
import { DecayingCounter } from "./utils/DecayingCounter";
|
||||
import { PluginNotLoadedError } from "knub/dist/plugins/PluginNotLoadedError";
|
||||
import { logRestCall } from "./restCallStats";
|
||||
import { logRateLimit } from "./rateLimitStats";
|
||||
|
||||
if (!process.env.KEY) {
|
||||
// tslint:disable-next-line:no-console
|
||||
|
@ -317,6 +318,10 @@ connect().then(async () => {
|
|||
startUptimeCounter();
|
||||
});
|
||||
|
||||
client.on(Constants.Events.RATE_LIMIT, (data) => {
|
||||
logRateLimit(data);
|
||||
});
|
||||
|
||||
bot.initialize();
|
||||
logger.info("Bot Initialized");
|
||||
logger.info("Logging in...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue