Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MessageManager<T, U, UCtor>

Type parameters

Hierarchy

Implements

  • MessageManagerInterface<T, U>

Constructors

constructor

  • new MessageManager<T, U, UCtor>(client: Client, channel: T, holds: UCtor): MessageManager<T, U, UCtor>

Properties

Readonly cache

cache: Collection<string, U>

Readonly channel

channel: T

Readonly client

client: Client

Readonly holds

holds: UCtor

Methods

_remove

  • _remove(data: U): boolean
  • Parameters

    • data: U

    Returns boolean

_upsert

  • _upsert(data: U): U
  • Parameters

    • data: U

    Returns U

Abstract fetch

  • fetch(): Promise<Collection<string, U>>
  • fetch(id: string): Promise<U>
  • fetch(ids: string[]): Promise<Collection<string, U>>
  • fetch(options: MessageRequestParams): Promise<Collection<string, U>>
  • Returns Promise<Collection<string, U>>

  • Parameters

    • id: string

    Returns Promise<U>

  • Parameters

    • ids: string[]

    Returns Promise<Collection<string, U>>

  • Parameters

    • options: MessageRequestParams

    Returns Promise<Collection<string, U>>

resolve

  • resolve(data: unknown): null | U
  • Parameters

    • data: unknown

    Returns null | U

resolveId

  • resolveId(data: unknown): null | string
  • Parameters

    • data: unknown

    Returns null | string

Generated using TypeDoc