Interface RoleBuilderDelegate
-
public interface RoleBuilderDelegateThis class is internally used by theRoleBuilderto 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.voidsetAuditLogReason(String reason)Sets the reason for the creation.voidsetColor(Color color)Sets the color of the role.voidsetDisplaySeparately(boolean displaySeparately)Sets if the role should be pinned in the user listing (sometimes called "hoist").voidsetMentionable(boolean mentionable)Sets if the role is mentionable or not.voidsetName(String name)Sets the name of the role.voidsetPermissions(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.
-
-