Skip to content

Handle

Defined in: packages/core/src/handles.ts:81

A reference to one Discord thing by its ids. A handle holds no data, so it is cheap to create, can be made before the thing is cached, and fails only when you use it.

  • peek() reads the cache and returns undefined when it is not there.
  • get() reads the cache, and asks Discord when it is not there.
  • fetch() asks Discord now and refreshes the cache.

T

fetch(): Promise<T>

Defined in: packages/core/src/handles.ts:84

Promise<T>


get(): Promise<T>

Defined in: packages/core/src/handles.ts:83

Promise<T>


peek(): T | undefined

Defined in: packages/core/src/handles.ts:82

T | undefined