Class ChannelUnreadCollection

Collection of Channel Unreads

Hierarchy

Constructors

Properties

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

Type declaration

    • (id): HydratedChannelUnread
    • Parameters

      • id: string

      Returns HydratedChannelUnread

updateUnderlyingObject: SetStoreFunction<Record<string, HydratedChannelUnread>>

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: ChannelUnread

      Instance

    • context: unknown

      Context

    • Optional data: unknown

      Data

    Returns void

  • Get or create

    Parameters

    • id: string

      Id

    • data: {
          _id: {
              channel: string;
              user: string;
          };
          last_id?: null | string;
          mentions?: string[];
      }

      Data

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

        Description

        Composite key pointing to a user's view of a channel

        • channel: string

          Description

          Channel Id

        • user: string

          Description

          User Id

      • Optional last_id?: null | string

        Description

        Id of the last message read in this channel by a user

      • Optional mentions?: string[]

        Description

        Array of message ids that mention the user

    Returns ChannelUnread

Generated using TypeDoc