Skip to main content

Class: MiddlewareStore

@sapphire/plugin-api.MiddlewareStore

since 1.0.0

Hierarchy

Constructors

constructor

new MiddlewareStore()

Overrides

Store<Middleware\>.constructor

Defined in

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:16

Properties

sortedMiddlewares

Readonly sortedMiddlewares: Middleware[] = []

The sorted middlewares, in ascending order of {@see Middleware#position}.

Defined in

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:14

Methods

clear

clear(): void

Returns

void

Overrides

Store.clear

Defined in

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:46


delete

delete(key): boolean

Parameters

NameType
keystring

Returns

boolean

Overrides

Store.delete

Defined in

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:37


run

run(request, response, route): Promise<void>

Parameters

NameType
requestApiRequest
responseApiResponse
routenull | Route

Returns

Promise<void>

Defined in

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:20


set

set(key, value): MiddlewareStore

Parameters

NameType
keystring
valueMiddleware

Returns

MiddlewareStore

Overrides

Store.set

Defined in

projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:27