use of io.discloader.discloader.network.json.GuildSyncJSON in project DiscLoader by R3alCl0ud.
the class GuildSync method handle.
@Override
public void handle(SocketPacket packet) {
String d = gson.toJson(packet.d);
GuildSyncJSON data = gson.fromJson(d, GuildSyncJSON.class);
IGuild guild = EntityRegistry.getGuildByID(data.id);
for (PresenceJSON pe : data.presences) {
guild.setPresence(pe);
}
for (MemberJSON me : data.members) {
guild.addMember(me);
}
}
Aggregations