Class GuildAction.RoleData

    • Constructor Detail

      • RoleData

        public RoleData​(long id)
    • Method Detail

      • setPermissionsRaw

        @Nonnull
        public GuildAction.RoleData setPermissionsRaw​(@Nullable
                                                      java.lang.Long rawPermissions)
        Sets the raw permission value for this Role
        Parameters:
        rawPermissions - Raw permission value
        Returns:
        The current RoleData instance for chaining convenience
      • addPermissions

        @Nonnull
        public GuildAction.RoleData addPermissions​(@Nonnull
                                                   Permission... permissions)
        Adds the provided permissions to the Role
        Parameters:
        permissions - The permissions to add
        Returns:
        The current RoleData instance for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If any of the provided permissions is null
      • addPermissions

        @Nonnull
        public GuildAction.RoleData addPermissions​(@Nonnull
                                                   java.util.Collection<Permission> permissions)
        Adds the provided permissions to the Role
        Parameters:
        permissions - The permissions to add
        Returns:
        The current RoleData instance for chaining convenience
        Throws:
        java.lang.IllegalArgumentException - If any of the provided permissions is null
      • setName

        @Nonnull
        public GuildAction.RoleData setName​(@Nullable
                                            java.lang.String name)
        Sets the name for this Role
        Parameters:
        name - The name
        Returns:
        The current RoleData instance for chaining convenience
        Throws:
        java.lang.IllegalStateException - If this is the public role
      • setColor

        @Nonnull
        public GuildAction.RoleData setColor​(@Nullable
                                             java.awt.Color color)
        Sets the color for this Role
        Parameters:
        color - The color for this Role
        Returns:
        The current RoleData instance for chaining convenience
        Throws:
        java.lang.IllegalStateException - If this is the public role
      • setColor

        @Nonnull
        public GuildAction.RoleData setColor​(@Nullable
                                             java.lang.Integer color)
        Sets the color for this Role
        Parameters:
        color - The color for this Role, or null to unset
        Returns:
        The current RoleData instance for chaining convenience
        Throws:
        java.lang.IllegalStateException - If this is the public role
      • setPosition

        @Nonnull
        public GuildAction.RoleData setPosition​(@Nullable
                                                java.lang.Integer position)
        Sets the position for this Role
        Parameters:
        position - The position
        Returns:
        The current RoleData instance for chaining convenience
        Throws:
        java.lang.IllegalStateException - If this is the public role
      • setMentionable

        @Nonnull
        public GuildAction.RoleData setMentionable​(@Nullable
                                                   java.lang.Boolean mentionable)
        Sets whether the Role is mentionable
        Parameters:
        mentionable - Whether the role is mentionable
        Returns:
        The current RoleData instance for chaining convenience
        Throws:
        java.lang.IllegalStateException - If this is the public role
      • setHoisted

        @Nonnull
        public GuildAction.RoleData setHoisted​(@Nullable
                                               java.lang.Boolean hoisted)
        Sets whether the Role is hoisted
        Parameters:
        hoisted - Whether the role is hoisted
        Returns:
        The current RoleData instance for chaining convenience
        Throws:
        java.lang.IllegalStateException - If this is the public role