Skip to main content

Interface: MiddlewareOptions

@sapphire/plugin-api.MiddlewareOptions

The options for all middlewares.

Hierarchy

  • Options

    MiddlewareOptions

Properties

enabled

Optional Readonly enabled: boolean

Whether or not the piece should be enabled. If set to false, the piece will be unloaded.

Default

true

Inherited from

Piece.Options.enabled

Defined in

node_modules/@sapphire/pieces/dist/esm/index.d.mts:204


name

Optional Readonly name: string

The name for the piece.

Default

''

Inherited from

Piece.Options.name

Defined in

node_modules/@sapphire/pieces/dist/esm/index.d.mts:199


position

Optional position: number

The position to insert the middleware at.

See

Middleware#position

Default

1000

Defined in

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