org.json.JSONStringpublic static class GuildAction.RoleData
extends java.lang.Object
implements org.json.JSONString
Role
of the resulting Guild that is constructed by a GuildAction instance
This may be used in GuildAction.ChannelData.addPermissionOverride(GuildAction.RoleData, long, long) ChannelData.addPermissionOverride(...)}!
| Modifier and Type | Method | Description |
|---|---|---|
GuildAction.RoleData |
addPermissions(java.util.Collection<Permission> permissions) |
Adds the provided permissions to the Role
|
GuildAction.RoleData |
addPermissions(Permission... permissions) |
Adds the provided permissions to the Role
|
GuildAction.RoleData |
setColor(java.awt.Color color) |
Sets the color for this Role
|
GuildAction.RoleData |
setColor(java.lang.Integer color) |
Sets the color for this Role
|
GuildAction.RoleData |
setHoisted(java.lang.Boolean hoisted) |
Sets whether the Role is hoisted
|
GuildAction.RoleData |
setMentionable(java.lang.Boolean mentionable) |
Sets whether the Role is mentionable
|
GuildAction.RoleData |
setName(java.lang.String name) |
Sets the name for this Role
|
GuildAction.RoleData |
setPermissionsRaw(java.lang.Long rawPermissions) |
Sets the raw permission value for this Role
|
GuildAction.RoleData |
setPosition(java.lang.Integer position) |
Sets the position for this Role
|
java.lang.String |
toJSONString() |
public GuildAction.RoleData setPermissionsRaw(java.lang.Long rawPermissions)
rawPermissions - Raw permission valuejava.lang.IllegalArgumentException - If the provided permissions are negative or exceed the maximum permissionspublic GuildAction.RoleData addPermissions(Permission... permissions)
permissions - The permissions to addjava.lang.IllegalArgumentException - If any of the provided permissions is nullpublic GuildAction.RoleData addPermissions(java.util.Collection<Permission> permissions)
permissions - The permissions to addjava.lang.IllegalArgumentException - If any of the provided permissions is nullpublic GuildAction.RoleData setName(java.lang.String name)
name - The namejava.lang.IllegalStateException - If this is the public rolepublic GuildAction.RoleData setColor(java.awt.Color color)
color - The color for this Rolejava.lang.IllegalStateException - If this is the public rolepublic GuildAction.RoleData setColor(java.lang.Integer color)
color - The color for this Role, or null to unsetjava.lang.IllegalStateException - If this is the public rolepublic GuildAction.RoleData setPosition(java.lang.Integer position)
position - The positionjava.lang.IllegalStateException - If this is the public rolepublic GuildAction.RoleData setMentionable(java.lang.Boolean mentionable)
mentionable - Whether the role is mentionablejava.lang.IllegalStateException - If this is the public rolepublic GuildAction.RoleData setHoisted(java.lang.Boolean hoisted)
hoisted - Whether the role is hoistedjava.lang.IllegalStateException - If this is the public rolepublic java.lang.String toJSONString()
toJSONString in interface org.json.JSONString