use of sx.blah.discord.api.IShard in project DisCal-Discord-Bot by NovaFox161.
the class DevCommand method moduleReload.
private void moduleReload(MessageReceivedEvent event) {
IMessage msg = Message.sendMessage("Reloading DisCal! This may take a moment!", event);
for (IShard s : msg.getClient().getShards()) {
s.logout();
s.login();
}
Message.sendMessage("DisCal successfully reloaded!", event);
}
use of sx.blah.discord.api.IShard in project DisCal-Discord-Bot by NovaFox161.
the class DevCommand method moduleTestShards.
private void moduleTestShards(MessageReceivedEvent event) {
Message.sendMessage("Testing shard responses...", event);
StringBuilder r = new StringBuilder();
for (IShard s : Main.client.getShards()) {
r.append(s.getInfo()[0]).append(": ").append(s.isReady()).append("\n");
}
Message.sendMessage(r.toString(), event);
}
use of sx.blah.discord.api.IShard in project Shadbot by Shadorc.
the class NetUtils method postStats.
public static void postStats() {
LogUtils.infof("Posting statistics...");
for (IShard shard : Shadbot.getClient().getShards()) {
NetUtils.postStatsOn("https://bots.discord.pw", APIKey.BOTS_DISCORD_PW_TOKEN, shard);
NetUtils.postStatsOn("https://discordbots.org", APIKey.DISCORD_BOTS_ORG_TOKEN, shard);
}
LogUtils.infof("Statistics posted.");
}