More debug
This commit is contained in:
parent
bd5cb6f556
commit
b2957b564d
1 changed files with 15 additions and 1 deletions
|
@ -12,7 +12,7 @@ import moment from "moment-timezone";
|
||||||
import { Client, TextChannel } from "eris";
|
import { Client, TextChannel } from "eris";
|
||||||
import { connect } from "./data/db";
|
import { connect } from "./data/db";
|
||||||
import { baseGuildPlugins, globalPlugins, guildPlugins } from "./plugins/availablePlugins";
|
import { baseGuildPlugins, globalPlugins, guildPlugins } from "./plugins/availablePlugins";
|
||||||
import { errorMessage, isDiscordHTTPError, isDiscordRESTError, successMessage } from "./utils";
|
import { errorMessage, isDiscordHTTPError, isDiscordRESTError, MINUTES, successMessage } from "./utils";
|
||||||
import { startUptimeCounter } from "./uptime";
|
import { startUptimeCounter } from "./uptime";
|
||||||
import { AllowedGuilds } from "./data/AllowedGuilds";
|
import { AllowedGuilds } from "./data/AllowedGuilds";
|
||||||
import { IZeppelinGlobalConfig, IZeppelinGuildConfig } from "./types";
|
import { IZeppelinGlobalConfig, IZeppelinGuildConfig } from "./types";
|
||||||
|
@ -208,6 +208,20 @@ connect().then(async () => {
|
||||||
|
|
||||||
client.once("ready", () => {
|
client.once("ready", () => {
|
||||||
startUptimeCounter();
|
startUptimeCounter();
|
||||||
|
|
||||||
|
// tslint:disable:no-console
|
||||||
|
setInterval(() => {
|
||||||
|
const shards = Array.from(client.shards.values());
|
||||||
|
console.log("Shards:", shards.length);
|
||||||
|
for (const shard of shards) {
|
||||||
|
console.log(`=== SHARD #${shard.id} ===`);
|
||||||
|
console.log("lastHeartbeatSent", shard.lastHeartbeatSent);
|
||||||
|
console.log("lastHeartbeatReceived", shard.lastHeartbeatReceived);
|
||||||
|
console.log("latency", shard.latency);
|
||||||
|
console.log("diff", shard.lastHeartbeatReceived - shard.lastHeartbeatSent);
|
||||||
|
}
|
||||||
|
}, 1 * MINUTES);
|
||||||
|
// tslint:enable:no-console
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.info("Starting the bot");
|
logger.info("Starting the bot");
|
||||||
|
|
Loading…
Add table
Reference in a new issue