Search in sources :

Example 1 with OverwriteObject

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)));
}
Also used : DiscordClientImpl(sx.blah.discord.api.internal.DiscordClientImpl) OverwriteObject(sx.blah.discord.api.internal.json.objects.OverwriteObject)

Aggregations

DiscordClientImpl (sx.blah.discord.api.internal.DiscordClientImpl)1 OverwriteObject (sx.blah.discord.api.internal.json.objects.OverwriteObject)1