revbot.js
    Preparing search index...

    Class ServerMember

    Represents a member of a server.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new ServerMember instance.

      Parameters

      • client: client

        The client instance.

      • data: {
            _id: { server: string; user: string };
            avatar?:
                | null
                | {
                    _id: string;
                    content_type: string;
                    deleted?: null
                    | boolean;
                    filename: string;
                    message_id?: null | string;
                    metadata:
                        | { type: "File" }
                        | { type: "Text" }
                        | { height: number; type: "Image"; width: number }
                        | { height: number; type: "Video"; width: number }
                        | { type: "Audio" };
                    object_id?: null | string;
                    reported?: null | boolean;
                    server_id?: null | string;
                    size: number;
                    tag: string;
                    user_id?: null | string;
                };
            joined_at: string;
            nickname?: null
            | string;
            roles?: string[];
            timeout?: null | string;
        }

        The raw data for the server member from the API.

        • _id: { server: string; user: string }

          Unique member id

          • server: string

            Server Id

          • user: string

            User Id

        • Optionalavatar?:
              | null
              | {
                  _id: string;
                  content_type: string;
                  deleted?: null
                  | boolean;
                  filename: string;
                  message_id?: null | string;
                  metadata:
                      | { type: "File" }
                      | { type: "Text" }
                      | { height: number; type: "Image"; width: number }
                      | { height: number; type: "Video"; width: number }
                      | { type: "Audio" };
                  object_id?: null | string;
                  reported?: null | boolean;
                  server_id?: null | string;
                  size: number;
                  tag: string;
                  user_id?: null | string;
              }

          Avatar attachment

        • joined_at: string

          Time at which this user joined the server

        • Optionalnickname?: null | string

          Member's nickname

        • Optionalroles?: string[]

          Member's roles

        • Optionaltimeout?: null | string

          Timestamp this member is timed out until

      Returns ServerMember

    Properties

    avatar: null | Attachment = null

    The avatar of the member, or null if none is set.

    client: client

    The client instance.

    id: string

    The unique identifier for the object.

    nickname: null | string = null

    The nickname of the member, or null if none is set.

    serverId: string

    The ID of the server this member belongs to.

    Accessors

    Methods

    • Updates the object with new data and returns a clone of the object.

      Parameters

      • data: PartialObject

        The data to update the object with.

      • Optionalclear: string[]

        Fields to clear in the object.

      Returns this

      A clone of the updated object.