Hierarchy

  • BaseManager<User>
    • UserManager

Constructors

Properties

[toStringTag]: string
client: Client
size: number

Returns

the number of elements in the Map.

[species]: MapConstructor

Accessors

Methods

  • Returns an iterable of entries in the map.

    Returns IterableIterator<[string, User]>

  • Returns void

  • Parameters

    • data: {
          _id: 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;
          };
          badges?: number;
          bot?: {
              owner: string;
          };
          discriminator: string;
          display_name?: string;
          flags?: number;
          online?: boolean;
          privileged?: boolean;
          profile?: {
              background?: {
                  _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;
              };
              content?: string;
          };
          relations?: {
              _id: string;
              status: "Blocked" | "Friend" | "Incoming" | "None" | "Outgoing" | "User" | "BlockedOther";
          }[];
          relationship?: "Blocked" | "Friend" | "Incoming" | "None" | "Outgoing" | "User" | "BlockedOther";
          status?: {
              presence?: "Online" | "Idle" | "Focus" | "Busy" | "Invisible";
              text?: string;
          };
          username: string;
      }
      • _id: string

        Description

        Unique 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
      • Optional badges?: number

        Format: int32

        Description

        Bitfield of user badges

      • Optional bot?: {
            owner: string;
        }

        Description

        Bot information

        • owner: string

          Description

          Id of the owner of this bot

      • discriminator: string

        Description

        Discriminator

      • Optional display_name?: string

        Description

        Display name

      • Optional flags?: number

        Format: int32

        Description

        Enum of user flags

      • Optional online?: boolean

        Description

        Whether this user is currently online

      • Optional privileged?: boolean

        Description

        Whether this user is privileged

      • Optional profile?: {
            background?: {
                _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;
            };
            content?: string;
        }

        Description

        User's profile page

        • Optional background?: {
              _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

          Background visible on user's profile

          • _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
        • Optional content?: string

          Description

          Text content on user's profile

      • Optional relations?: {
            _id: string;
            status: "Blocked" | "Friend" | "Incoming" | "None" | "Outgoing" | "User" | "BlockedOther";
        }[]

        Description

        Relationships with other users

      • Optional relationship?: "Blocked" | "Friend" | "Incoming" | "None" | "Outgoing" | "User" | "BlockedOther"

        Description

        Current session user's relationship with this user

      • Optional status?: {
            presence?: "Online" | "Idle" | "Focus" | "Busy" | "Invisible";
            text?: string;
        }

        Description

        User's current status

        • Optional presence?: "Online" | "Idle" | "Focus" | "Busy" | "Invisible"

          Description

          Current presence option

        • Optional text?: string

          Description

          Custom status text

      • username: string

        Description

        Username

    Returns User

  • Returns an iterable of key, value pairs for every entry in the map.

    Returns IterableIterator<[string, User]>

  • Parameters

    • Rest ...d: [predicate: ((value: User, index: number, array: User[]) => unknown), thisArg?: any]

    Returns User[]

  • Parameters

    • Rest ...d: [predicate: ((value: User, index: number, obj: User[]) => unknown), thisArg?: any]

    Returns User

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

    Parameters

    • Optional updated: User[]

      The objects that caused this update.

    Returns void

  • Executes a provided function once per each key/value pair in the Map, in insertion order.

    Parameters

    • callbackfn: ((value: User, key: string, map: Map<string, User>) => void)
        • (value: User, key: string, map: Map<string, User>): void
        • Parameters

          • value: User
          • key: string
          • map: Map<string, User>

          Returns void

    • Optional thisArg: any

    Returns void

  • Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

    Returns

    Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

    Parameters

    • key: string

    Returns User

  • Returns

    boolean indicating whether an element with the specified key exists or not.

    Parameters

    • key: string

    Returns boolean

  • Returns an iterable of keys in the map

    Returns IterableIterator<string>

  • Type Parameters

    • U

    Parameters

    • callbackfn: ((value: User, index: number, array: User[]) => U)
        • (value: User, index: number, array: User[]): U
        • Parameters

          • value: User
          • index: number
          • array: User[]

          Returns U

    Returns U[]

  • Returns an iterable of values in the map

    Returns IterableIterator<User>