MCPcopy Create free account
hub / github.com/PolyMarsDev/Sokobot / updateDebugInfo

Method updateDebugInfo

src/main/java/me/polymarsdev/sokobot/Bot.java:133–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131 private static String debugInfo = "";
132
133 private static void updateDebugInfo() {
134 long now = System.currentTimeMillis();
135 if (now - lastDebugInfoUpdate < 10000) return;
136 lastDebugInfoUpdate = now;
137 int a = enableDatabase ? 1 : 0;
138 int b = enableDatabase ? database.isConnected() ? 1 : 0 : 0;
139 int c = 0;
140 int d = shardManager.getShardsTotal();
141 for (JDA shard : shardManager.getShards()) if (shard.getStatus() == JDA.Status.CONNECTED) c++;
142 debugInfo = a + b + c + d + "";
143 }
144
145 // Print a message when debug is on
146 public static void debug(String log) {

Callers 1

debugMethod · 0.95

Calls 2

isConnectedMethod · 0.80
getStatusMethod · 0.45

Tested by

no test coverage detected