Latest
class Collection
extends Map<K, V>
import { Collection } from "https://dotland.deno.dev/x/discordeno@18.0.1/plugins/fileloader/deps.ts";

Constructors

new
Collection(entries?: (readonly (readonly [K, V])[] | null) | Map<K, V>, options?: CollectionOptions<K, V>)

Properties

maxSize: number | undefined
sweeper: CollectionSweeper<K, V> & { intervalId?: number; } | undefined

Methods

changeSweeperFilter(newFilter: (
value: V,
key: K,
bot: Bot,
) => boolean
)
changeSweeperInterval(newInterval: number)
every(callback: (value: V, key: K) => boolean)
filter(callback: (value: V, key: K) => boolean)
find(callback: (value: V, key: K) => boolean)
first(): V | undefined

Retrieve the value of the first element in this collection

forceSet(key: K, value: V)
last(): V | undefined
map<T>(callback: (value: V, key: K) => T)
random(): V | undefined
reduce<T>(callback: (
accumulator: T,
value: V,
key: K,
) => T
, initialValue?: T
): T
set(key: K, value: V)
some(callback: (value: V, key: K) => boolean)
startSweeper(options: CollectionSweeper<K, V>): number
stopSweeper(): void
import Collection
import { Collection } from "https://dotland.deno.dev/x/discordeno@18.0.1/plugins/fileloader/deps.ts";