use of org.javacord.api.event.server.member.ServerMemberUnbanEvent in project Javacord by BtoBastian.
the class GuildBanRemoveHandler method handle.
@Override
public void handle(JsonNode packet) {
api.getPossiblyUnreadyServerById(packet.get("guild_id").asLong()).map(server -> (ServerImpl) server).ifPresent(server -> {
User user = new UserImpl(api, packet.get("user"), (MemberImpl) null, server);
ServerMemberUnbanEvent event = new ServerMemberUnbanEventImpl(server, user);
api.getEventDispatcher().dispatchServerMemberUnbanEvent(server, server, user, event);
});
}
Aggregations