Interface RoleBuilderDelegate
-
public interface RoleBuilderDelegate
This class is internally used by theRoleBuilder
to create roles. You usually don't want to interact with this object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Role>
create()
Creates the role.void
setAuditLogReason(String reason)
Sets the reason for the creation.void
setColor(Color color)
Sets the color of the role.void
setDisplaySeparately(boolean displaySeparately)
Sets if the role should be pinned in the user listing (sometimes called "hoist").void
setMentionable(boolean mentionable)
Sets if the role is mentionable or not.void
setName(String name)
Sets the name of the role.void
setPermissions(Permissions permissions)
Sets the permissions of the role.
-
-
-
Method Detail
-
setAuditLogReason
void setAuditLogReason(String reason)
Sets the reason for the creation. This reason will be visible in the audit log entry(s).- Parameters:
reason
- The reason for this update.
-
setName
void setName(String name)
Sets the name of the role. By default it's"new role"
.- Parameters:
name
- The name of the role.
-
setPermissions
void setPermissions(Permissions permissions)
Sets the permissions of the role. By default it uses the permissions of the @everyone role.- Parameters:
permissions
- The permissions to set.
-
setColor
void setColor(Color color)
Sets the color of the role.- Parameters:
color
- The color of the role.
-
setMentionable
void setMentionable(boolean mentionable)
Sets if the role is mentionable or not. By default it's set tofalse
.- Parameters:
mentionable
- Whether the role should be mentionable or not.
-
setDisplaySeparately
void setDisplaySeparately(boolean displaySeparately)
Sets if the role should be pinned in the user listing (sometimes called "hoist").- Parameters:
displaySeparately
- Whether the role should be pinned in the user listing or not.
-
create
CompletableFuture<Role> create()
Creates the role.- Returns:
- The created role.
-
-