use of sx.blah.discord.api.internal.json.objects.OverwriteObject in project Discord4J by Discord4J.
the class Category method overridePermissions.
private void overridePermissions(String type, String id, EnumSet<Permissions> toAdd, EnumSet<Permissions> toRemove) {
PermissionUtils.requirePermissions(getModifiedPermissions(getClient().getOurUser()), EnumSet.of(Permissions.MANAGE_PERMISSIONS));
((DiscordClientImpl) client).REQUESTS.PUT.makeRequest(DiscordEndpoints.CHANNELS + getStringID() + "/permissions/" + id, new OverwriteObject(type, null, Permissions.generatePermissionsNumber(toAdd), Permissions.generatePermissionsNumber(toRemove)));
}
Aggregations