use of io.discloader.discloader.network.json.MessageJSON in project DiscLoader by R3alCl0ud.
the class FetchMessage method complete.
@Override
public void complete(String s, Throwable ex) {
if (ex != null) {
future.completeExceptionally(ex);
return;
}
MessageJSON data = DLUtil.gson.fromJson(s, MessageJSON.class);
IMessage message = new Message<>(channel, data);
channel.getMessages().put(message.getID(), message);
future.complete(message);
}
Aggregations