use of io.discloader.discloader.network.json.VoiceServerUpdateJSON in project DiscLoader by R3alCl0ud.
the class VoiceServerUpdate method handle.
public void handle(SocketPacket packet) {
String d = this.gson.toJson(packet.d);
try {
VoiceServerUpdateJSON data = gson.fromJson(d, VoiceServerUpdateJSON.class);
VoiceConnection connection = EntityRegistry.getVoiceConnectionByID(SnowflakeUtil.parse(data.guild_id));
connection.endpointReceived(data.endpoint, data.token);
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations