@Override protected RequestBody finalizeData() { JSONObject frame = new JSONObject().put("name", getChannel().getName()); if (shouldUpdate(NAME)) frame.put("name", name); if (shouldUpdate(POSITION)) frame.put("position", position); if (shouldUpdate(TOPIC)) frame.put("topic", opt(topic)); if (shouldUpdate(NSFW)) frame.put("nsfw", nsfw); if (shouldUpdate(SLOWMODE)) frame.put("rate_limit_per_user", slowmode); if (shouldUpdate(USERLIMIT)) frame.put("user_limit", userlimit); if (shouldUpdate(BITRATE)) frame.put("bitrate", bitrate); if (shouldUpdate(PARENT)) frame.put("parent_id", opt(parent)); withLock(lock, (lock) -> { if (shouldUpdate(PERMISSION)) frame.put("permission_overwrites", getOverrides()); }); reset(); return getRequestBody(frame); }