Hierarchy

Constructors

  • Parameters

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

        Description

        Unique member id

        • server: string

          Description

          Server Id

        • user: string

          Description

          User Id

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

        Description

        Avatar attachment

        • _id: string

          Description

          Unique Id

        • content_type: string

          Description

          Raw content type of this file

        • Optional deleted?: boolean

          Description

          Whether this file was deleted

        • filename: string

          Description

          Original filename

        • Optional message_id?: string
        • metadata: {
              type: "File";
          } | {
              type: "Text";
          } | {
              height: number;
              type: "Image";
              width: number;
          } | {
              height: number;
              type: "Video";
              width: number;
          } | {
              type: "Audio";
          }

          Description

          Parsed metadata of this file

        • Optional object_id?: string

          Description

          Id of the object this file is associated with

        • Optional reported?: boolean

          Description

          Whether this file was reported

        • Optional server_id?: string
        • size: number

          Format: int

          Description

          Size of this file (in bytes)

        • tag: string

          Description

          Tag / bucket this file was uploaded to

        • Optional user_id?: string
      • joined_at: string

        Description

        Time at which this user joined the server

      • Optional nickname?: string

        Description

        Member's nickname

      • Optional roles?: string[]

        Description

        Member's roles

      • Optional timeout?: string

        Description

        Timestamp this member is timed out until

    Returns Member

Properties

client: Client
deleted: boolean = false
timeoutClearer: Timeout

Accessors

Methods

  • Ban this member.

    Parameters

    • Optional data: {
          reason?: string;
      }
      • Optional reason?: string

        Description

        Ban reason

    Returns Promise<void>

  • Edit this member.

    Parameters

    • data: {
          avatar?: string;
          nickname?: string;
          remove?: ("Nickname" | "Avatar" | "Roles" | "Timeout")[];
          roles?: string[];
          timeout?: string;
      }
      • Optional avatar?: string

        Description

        Attachment Id to set for avatar

      • Optional nickname?: string

        Description

        Member nickname

      • Optional remove?: ("Nickname" | "Avatar" | "Roles" | "Timeout")[]

        Description

        Fields to remove from channel object

      • Optional roles?: string[]

        Description

        Array of role ids

      • Optional timeout?: string

        Description

        Timestamp this member is timed out until

    Returns Promise<void>

  • Runs all of the callbacks for this emitter. (meant to run when an update occurs)

    Parameters

    • Optional updated: any[]

      The objects that caused this update.

    Returns void

  • Set or remove the timeout for this member.

    Parameters

    • ends: number

      Epoch time for timeout to end or null to remove.

    Returns Promise<void>

  • Update this object with new API data.

    Parameters

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

    Returns Member