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 returnsundefinedwhen it is not there.get()reads the cache, and asks Discord when it is not there.fetch()asks Discord now and refreshes the cache.
Type Parameters
Section titled “Type Parameters”T
Methods
Section titled “Methods”fetch()
Section titled “fetch()”fetch():
Promise<T>
Defined in: packages/core/src/handles.ts:84
Returns
Section titled “Returns”Promise<T>
get():
Promise<T>
Defined in: packages/core/src/handles.ts:83
Returns
Section titled “Returns”Promise<T>
peek()
Section titled “peek()”peek():
T|undefined
Defined in: packages/core/src/handles.ts:82
Returns
Section titled “Returns”T | undefined