Interface RoleBuilderDelegate


  • public interface RoleBuilderDelegate
    This class is internally used by the RoleBuilder 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
      java.util.concurrent.CompletableFuture<Role> create()
      Creates the role.
      void setAuditLogReason​(java.lang.String reason)
      Sets the reason for the creation.
      void setColor​(java.awt.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​(java.lang.String name)
      Sets the name of the role.
      void setPermissions​(Permissions permissions)
      Sets the permissions of the role.
    • Method Detail

      • setAuditLogReason

        void setAuditLogReason​(java.lang.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​(java.lang.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​(java.awt.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 to false.
        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

        java.util.concurrent.CompletableFuture<Role> create()
        Creates the role.
        Returns:
        The created role.