Skip to main content

Interface: PieceContext

The context for the piece, contains extra information from the store, the piece's path, and the store that loaded it.

Properties

name

โ€ข Readonly name: string

The module's name extracted from the path.

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:398


path

โ€ข Readonly path: string

The path the module was loaded from, relative to PieceContext.root.

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:394


root

โ€ข Readonly root: string

The root directory the piece was loaded from.

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:390


store

โ€ข Readonly store: Store<Piece<PieceOptions>>

The store that loaded the piece.

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:402