Class: PluginPatternCommandsPreCommandRunListener
@sapphire/plugin-pattern-commands.PluginPatternCommandsPreCommandRunListener
Hierarchy
Listener
<typeofPreCommandRun
>↳
PluginPatternCommandsPreCommandRunListener
Constructors
constructor
• new PluginPatternCommandsPreCommandRunListener(context
)
Parameters
Name | Type |
---|---|
context | PieceContext |
Overrides
Listener<typeof PatternCommandEvents.PreCommandRun\>.constructor
Defined in
projects/plugins/packages/pattern-commands/src/listeners/PluginPreCommandRun.ts:7
Properties
emitter
• Readonly
emitter: null
| __module
The emitter, if any.
Since
2.0.0
Inherited from
Listener.emitter
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:348
enabled
• enabled: boolean
Whether or not the piece is enabled.
Inherited from
Listener.enabled
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:450
event
• Readonly
event: string
| symbol
The name of the event the listener listens to.
Since
2.0.0
Inherited from
Listener.event
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:353
location
• Readonly
location: PieceLocation
The location metadata for the piece's file.
Inherited from
Listener.location
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:442
name
• Readonly
name: string
The name of the piece.
Inherited from
Listener.name
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:446
once
• Readonly
once: boolean
Whether the listener will be unloaded after the first run.
Since
2.0.0
Inherited from
Listener.once
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:358
options
• Readonly
options: ListenerOptions
The raw options passed to this Piece
Inherited from
Listener.options
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:454
store
• store: ListenerStore
The ListenerStore that contains this Listener.
Inherited from
Listener.store
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:343
Accessors
container
• get
container(): Container
A reference to the Container object for ease of use.
See
container
Returns
Container
Inherited from
Listener.container
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:460
Methods
onLoad
▸ onLoad(): unknown
Returns
unknown
Inherited from
Listener.onLoad
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:362
onUnload
▸ onUnload(): unknown
Returns
unknown
Inherited from
Listener.onUnload
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:363
reload
▸ reload(): Promise
<void
>
Reloads the piece by loading the same path in the store.
Returns
Promise
<void
>
Inherited from
Listener.reload
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:478
run
▸ run(payload
): Promise
<void
>
Parameters
Name | Type |
---|---|
payload | PatternCommandPrePayload |
Returns
Promise
<void
>
Overrides
Listener.run
Defined in
projects/plugins/packages/pattern-commands/src/listeners/PluginPreCommandRun.ts:11
toJSON
▸ toJSON(): ListenerJSON
Returns
ListenerJSON
Inherited from
Listener.toJSON
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:364
unload
▸ unload(): Promise
<void
>
Unloads and disables the piece.
Returns
Promise
<void
>
Inherited from
Listener.unload
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:474