Interface SelfMemberManager

All Superinterfaces:
AuditableRestAction<Void>, Manager<SelfMemberManager>, RestAction<Void>

public interface SelfMemberManager extends Manager<SelfMemberManager>
Manager providing functionality to update one or more fields for the logged in account.
See Also:
  • Field Details

  • Method Details

    • getMember

      @Nonnull SelfMember getMember()
      The SelfMember that will be modified by this SelfMemberManager.
      Returns:
      The corresponding member
    • reset

      Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
      Example: manager.reset(SelfMemberManager.NAME | SelfMemberManager.AVATAR);

      Flag Constants:

      Specified by:
      reset in interface Manager<SelfMemberManager>
      Parameters:
      fields - Integer value containing the flags to reset.
      Returns:
      SelfMemberManager for chaining convenience
    • reset

      Resets the fields specified by the provided bit-flag patterns.
      Example: manager.reset(SelfMemberManager.NAME, SelfMemberManager.AVATAR);

      Flag Constants:

      Specified by:
      reset in interface Manager<SelfMemberManager>
      Parameters:
      fields - Integer values containing the flags to reset.
      Returns:
      SelfMemberManager for chaining convenience
    • setNickname

      Sets the nickname for the guild member of the currently logged in account.

      The nickname is a name specific to the guild, when not set, your user's name will display.

      Parameters:
      nickname - The new nickname, max 32 characters in length, null to remove the nickname
      Returns:
      SelfMemberManager for chaining convenience
      Throws:
      IllegalArgumentException -
      • If the provided nickname is non-null and is blank or more than 32 characters in length
      • If the guild member of the current logged in account does not have the NICKNAME_CHANGE permission
    • setAvatar

      Sets the avatar for the guild member of the currently logged in account.
      Parameters:
      avatar - An Icon instance representing the new Avatar, null to reset the avatar to the user avatar.
      Returns:
      SelfMemberManager for chaining convenience
    • setBanner

      Sets the banner for the guild member of the currently logged in account.
      Parameters:
      banner - An Icon instance representing the new banner, null to reset the banner to the user banner.
      Returns:
      SelfMemberManager for chaining convenience
    • setBio

      Sets the bio for the guild member of the currently logged in account.
      Parameters:
      bio - The new bio, null to remove the bio
      Returns:
      SelfMemberManager for chaining convenience
      Throws:
      IllegalArgumentException - If the provided bio is non-null and is blank or more than 190 characters in length