Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MessageReactionStore

The store for message reactions.

since

0.0.1

Hierarchy

Index

Constructors

constructor

Properties

Private #limit

#limit: number

The cache limit of this DataStore

Protected Readonly Holds

Readonly client

client: Client

Readonly message

message: Message

The message this store belongs to.

since

0.0.1

Readonly size

size: number

Accessors

first

  • The first item in this Cache

    Returns [string, MessageReaction] | null

firstKey

  • get firstKey(): string | null
  • The first key of this cache

    Returns string | null

firstValue

  • The first value of this cache

    Returns MessageReaction | null

last

  • The last item in this cache

    Returns [string, MessageReaction] | null

lastKey

  • get lastKey(): string | null
  • The last key of this cache

    Returns string | null

lastValue

  • The last value of this cache

    Returns MessageReaction | null

Static [Symbol.species]

  • get [Symbol.species](): typeof Cache

Methods

Protected _add

add

clear

  • clear(): void
  • Returns void

clone

  • Returns a shallow clone of this Cache

    Returns Cache<string, MessageReaction>

concat

  • Returns a new Cache with this and other caches together

    Parameters

    • Rest ...caches: Cache<string, MessageReaction>[]

      Other caches to include in the new cache

    Returns Cache<string, MessageReaction>

delete

  • delete(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

equals

  • Naive equality compare function

    Parameters

    Returns boolean

every

  • every(fn: (value: MessageReaction, key: string, map: this) => boolean, thisArg?: any): boolean
  • Tests if every entry in this cache meets a condition

    Parameters

    • fn: (value: MessageReaction, key: string, map: this) => boolean

      The function to test the condition

    • Optional thisArg: any

      Optional binding for the fn param

    Returns boolean

filter

  • Returns a new filtered Cache based on the filter function

    Parameters

    • fn: (value: MessageReaction, key: string, map: this) => boolean

      Function used to determine what entries are in the new Cache

    • Optional thisArg: any

      Optional binding for the fn param

    Returns Cache<string, MessageReaction>

find

  • Finds an entry from this Cache

    Parameters

    • fn: (value: MessageReaction, key: string, map: this) => boolean

      Function used to find what you are looking for

    • Optional thisArg: any

      Optional binding for the fn param

    Returns [string, MessageReaction] | undefined

findKey

  • findKey(fn: (value: MessageReaction, key: string, map: this) => boolean, thisArg?: any): string | undefined
  • Finds a key from this Cache

    Parameters

    • fn: (value: MessageReaction, key: string, map: this) => boolean

      Function used to find what you are looking for

    • Optional thisArg: any

      Optional binding for the fn param

    Returns string | undefined

findValue

  • Finds a value from this Cache

    Parameters

    • fn: (value: MessageReaction, key: string, map: this) => boolean

      Function used to find what you are looking for

    • Optional thisArg: any

      Optional binding for the fn param

    Returns MessageReaction | undefined

forEach

get

  • Parameters

    • key: string

    Returns MessageReaction | undefined

has

  • has(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

iterate

map

  • map<T>(fn: (value: MessageReaction, key: string, map: this) => T, thisArg?: any): T[]
  • Maps this Cache to an array (like Array#map())

    Type parameters

    • T

    Parameters

    • fn: (value: MessageReaction, key: string, map: this) => T

      Function to determine what is mapped to the new Array

    • Optional thisArg: any

      Optional binding for the fn param

    Returns T[]

reduce

  • reduce<I>(fn: (accumulator: I, value: MessageReaction, key: string, map: this) => I, initialValue: I, thisArg?: any): I
  • Reduces this cache into a singularity

    Type parameters

    • I

    Parameters

    • fn: (accumulator: I, value: MessageReaction, key: string, map: this) => I

      The function to determine how this Cache is reduced

        • Parameters

          Returns I

    • initialValue: I

      The initial value

    • Optional thisArg: any

      Optional binding for the fn param

    Returns I

remove

resolve

resolveID

  • resolveID(data: unknown): string | null

set

some

  • some(fn: (value: MessageReaction, key: string, map: this) => boolean, thisArg?: any): boolean
  • Tests if some entries in this cache meets a condition

    Parameters

    • fn: (value: MessageReaction, key: string, map: this) => boolean

      The function to test the condition

    • Optional thisArg: any

      Optional binding for the fn param

    Returns boolean

sort

  • Sorts entries in-place in this Cache

    Parameters

    • Optional compareFunction: undefined | ((v0: MessageReaction, v1: MessageReaction, k0?: K, k1?: K) => number)

      Function to determine how this Cache should be sorted

    Returns this

sorted

  • Sorts entries in a new Cache

    Parameters

    • Optional compareFunction: undefined | ((v0: MessageReaction, v1: MessageReaction, k0?: K, k1?: K) => number)

      Function to determine how the resulting Cache should be sorted

    Returns Cache<string, MessageReaction>

sweep

  • sweep(fn: (value: MessageReaction, key: string, map: this) => boolean, thisArg?: any): number
  • Sweeps entries from this Cache

    Parameters

    • fn: (value: MessageReaction, key: string, map: this) => boolean

      Function used to determine what entries are swept

    • Optional thisArg: any

      Optional binding for the fn param

    Returns number

toJSON

  • toJSON(): string[]

Generated using TypeDoc