Class ServerMemberCollection

Collection of Server Members

Hierarchy

Constructors

Properties

#objects: ReactiveMap<string, ServerMember> = ...
#storage: ObjectStorage<HydratedServerMember> = ...
client: Client
getUnderlyingObject: ((id) => HydratedServerMember)

Type declaration

    • (id): HydratedServerMember
    • Parameters

      • id: string

      Returns HydratedServerMember

updateUnderlyingObject: SetStoreFunction<Record<string, HydratedServerMember>>

Methods

  • Create a new instance of an object

    Parameters

    • id: string

      Id

    • type: "user" | "server" | "channel" | "bot" | "channelUnread" | "channelWebhook" | "emoji" | "message" | "serverMember" | "session"

      Type

    • instance: ServerMember

      Instance

    • context: unknown

      Context

    • Optional data: unknown

      Data

    Returns void

  • Get or create

    Parameters

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

      Id

      • server: string

        Description

        Server Id

      • user: string

        Description

        User Id

    • 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;
      }

      Data

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

        Description

        Unique member id

        • server: string

          Description

          Server Id

        • user: string

          Description

          User Id

      • Optional 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;
        }

        Description

        Avatar attachment

      • joined_at: string

        Description

        Time at which this user joined the server

      • Optional nickname?: null | string

        Description

        Member's nickname

      • Optional roles?: string[]

        Description

        Member's roles

      • Optional timeout?: null | string

        Description

        Timestamp this member is timed out until

    Returns ServerMember

  • Check if member exists by composite key

    Parameters

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

      Id

      • server: string

        Description

        Server Id

      • user: string

        Description

        User Id

    Returns boolean

    Whether it exists

  • check partial status by composite key

    Parameters

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

      Id

      • server: string

        Description

        Server Id

      • user: string

        Description

        User Id

    Returns boolean

    Member

Generated using TypeDoc