Search in sources :

Example 6 with GuildJSON

use of io.discloader.discloader.network.json.GuildJSON in project DiscLoader by R3alCl0ud.

the class ModifyGuild method complete.

public void complete(String r, Throwable ex) {
    if (ex != null) {
        future.completeExceptionally(ex);
        return;
    }
    GuildJSON data = gson.fromJson(r, GuildJSON.class);
    guild.setup(data);
    future.complete(guild);
}
Also used : GuildJSON(io.discloader.discloader.network.json.GuildJSON)

Aggregations

GuildJSON (io.discloader.discloader.network.json.GuildJSON)6 IGuild (io.discloader.discloader.entity.guild.IGuild)4 Gson (com.google.gson.Gson)1 IEventListener (io.discloader.discloader.common.event.IEventListener)1 GuildCreateEvent (io.discloader.discloader.common.event.guild.GuildCreateEvent)1 GuildDeleteEvent (io.discloader.discloader.common.event.guild.GuildDeleteEvent)1 GuildUpdateEvent (io.discloader.discloader.common.event.guild.GuildUpdateEvent)1 PermissionsException (io.discloader.discloader.common.exceptions.PermissionsException)1 DLUser (io.discloader.discloader.core.entity.user.DLUser)1 ChannelJSON (io.discloader.discloader.network.json.ChannelJSON)1 ReadyJSON (io.discloader.discloader.network.json.ReadyJSON)1 RESTOptions (io.discloader.discloader.network.rest.RESTOptions)1 CompletableFuture (java.util.concurrent.CompletableFuture)1 JSONObject (org.json.JSONObject)1