Represents a guild user.

Hierarchy (view full)

Constructors

  • Parameters

    • data: {
          isOwner: boolean;
          joinedAt: string;
          nickname?: string;
          roleIds: number[];
          user: {
              avatar?: string;
              banner?: string;
              createdAt: string;
              id: string;
              name: string;
              status?: {
                  content?: string;
                  emoteId: number;
              };
              type?: UserType;
          };
      }

      raw data.

      • isOwner: boolean

        Is owner

        false
        
      • joinedAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the member was created at

      • Optionalnickname?: string

        Nickname

      • roleIds: number[]

        Role IDs

      • user: {
            avatar?: string;
            banner?: string;
            createdAt: string;
            id: string;
            name: string;
            status?: {
                content?: string;
                emoteId: number;
            };
            type?: UserType;
        }
        • Optionalavatar?: string

          Avatar Format: media-uri

          The avatar image associated with the user

        • Optionalbanner?: string

          Banner Format: media-uri

          The banner image associated with the user

        • createdAt: string

          Created at Format: date-time

          The ISO 8601 timestamp that the user was created at

        • id: string

          User ID Format: user-id

          The ID of the user

        • name: string

          User name

          The user's name

        • Optionalstatus?: {
              content?: string;
              emoteId: number;
          }
          • Optionalcontent?: string

            Content Format: status markdown

            The content of the user status. The supported markdown for this content only includes reactions and plaintext for now

          • emoteId: number

            Emote ID

        • Optionaltype?: UserType

          User type

          The type of user. If this property is absent, it can assumed to be of type user

    • client: Client

      client.

    • guildID: string

      ID of the guild.

    Returns Member

Properties

app: boolean

If true, the user is an app (aka: bot).

avatarURL: null | string

Current avatar url of the user.

bannerURL: null | string

Current banned url of the user.

client: Client

App's client.

createdAt: Date

When the user account was created.

guildID: string

Guild ID.

id: string

Item ID

isOwner: boolean

Tells you if the member is the server owner.

joinedAt: null | Date

When this member joined the guild.

nickname: null | string

Member's server nickname.

roles: number[]

Array of member's roles.

type: null | UserTypes

User type

username: string

User's username.

Accessors

  • get guild(): Guild | Promise<Guild>
  • Guild where the user comes from, returns Guild or a promise. If guild isn't cached & the request failed, this will return you undefined.

    Returns Guild | Promise<Guild>

  • get user(): User
  • Member's user, shows less information.

    Returns User

Methods

  • Add this member to a guild group.

    Parameters

    • groupID: string

      ID of the guild group.

    Returns Promise<void>

  • Add a role to this member.

    Parameters

    • roleID: number

      ID of the role to be added.

    Returns Promise<void>

  • Award the member using the built-in EXP system.

    Parameters

    • amount: number

      Amount of experience to give.

    Returns Promise<number>

  • Ban this member.

    Parameters

    • Optionalreason: string

      The reason of the ban.

    Returns Promise<BannedMember>

  • Edit this member.

    Parameters

    Returns Promise<void>

  • Get member permission

    Returns Promise<Permissions[]>

  • Get a specified social link from the member, if member is connected to them through Guilded.

    Parameters

    • socialMediaName: string

      Name of a social media linked to this member.

    Returns Promise<SocialLink>

  • Kick this member.

    Returns Promise<void>

  • Remove this member from a guild group.

    Parameters

    • groupID: string

      ID of the guild group.

    Returns Promise<void>

  • Remove a role from this member.

    Parameters

    • roleID: number

      ID of the role to be added.

    Returns Promise<void>

  • Set member's experience using the built-in EXP system.

    Parameters

    • amount: number

      Amount of experience to set.

    Returns Promise<number>

  • Unban this member.

    Returns Promise<void>