gunshi / default / PluginExtension
Type Alias: PluginExtension()<T, G>
ts
type PluginExtension<T, G> = (ctx, cmd) => Awaitable<T>;Plugin extension
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
T | Record<string, unknown> | The type of the extension object returned by the plugin extension function. |
G extends GunshiParams | DefaultGunshiParams | A type extending GunshiParams to specify the shape of CommandContextCore. |
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | CommandContextCore<G> | The command context core |
cmd | Command<G> | The command to which the plugin is being applied |
Returns
Awaitable<T>
An object of type T that represents the extension provided by the plugin
Since
v0.27.0
