Skip to main content

Interface: Container

Defined in: node_modules/@sapphire/pieces/dist/esm/index.d.mts:772

Represents the type of the properties injected into the container, which is available at container.

Because Sapphire works as a standalone framework (independent of external libraries), there is a need to pass data from one place to another, which would vary depending on the user and their use-cases.

Furthermore, plugins may use this structure to add properties referencing to the plugin's objects so they can be accessed by both the user and the plugin at any moment and at any place.

Finally, both library developers and bot developers should augment the Container interface from this module using module augmentation.

Properties

applicationCommandRegistries

applicationCommandRegistries: object

Defined in: projects/framework/src/lib/SapphireClient.ts:400

acquire()

acquire: (commandName: string) => ApplicationCommandRegistry

Acquires a registry for a command by its name.

Parameters
ParameterTypeDescription
commandNamestringThe name of the command.
Returns

ApplicationCommandRegistry

The application command registry for the command


client

client: SapphireClient

Defined in: projects/framework/src/lib/SapphireClient.ts:398


logger

logger: ILogger

Defined in: projects/framework/src/lib/SapphireClient.ts:399