mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
debug: add global rate limit logging
This commit is contained in:
parent
bb94d77143
commit
95c3efbdb4
1 changed files with 9 additions and 0 deletions
|
@ -370,6 +370,15 @@ connect().then(async () => {
|
||||||
enableProfiling();
|
enableProfiling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let lowestGlobalRemaining = Infinity;
|
||||||
|
setInterval(() => {
|
||||||
|
lowestGlobalRemaining = Math.min(lowestGlobalRemaining, (client as any).rest.globalRemaining);
|
||||||
|
}, 100);
|
||||||
|
setInterval(() => {
|
||||||
|
console.log("Lowest global remaining in the past 5 seconds:", lowestGlobalRemaining);
|
||||||
|
lowestGlobalRemaining = Infinity;
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
bot.initialize();
|
bot.initialize();
|
||||||
logger.info("Bot Initialized");
|
logger.info("Bot Initialized");
|
||||||
logger.info("Logging in...");
|
logger.info("Logging in...");
|
||||||
|
|
Loading…
Add table
Reference in a new issue