Class: PreconditionStore
Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:8
Extends
Store
<Precondition
,"preconditions"
>
Constructors
new PreconditionStore()
new PreconditionStore():
PreconditionStore
Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:11
Returns
Overrides
Store<Precondition, 'preconditions'>.constructor
Methods
chatInputRun()
chatInputRun(
interaction
:ChatInputCommandInteraction
,command
:ChatInputCommand
,context
:PreconditionContext
):AsyncPreconditionResult
Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:32
Parameters
Parameter | Type |
---|---|
interaction | ChatInputCommandInteraction |
command | ChatInputCommand |
context | PreconditionContext |
Returns
clear()
clear():
void
Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:95
Returns
void
Overrides
Store.clear
contextMenuRun()
contextMenuRun(
interaction
:ContextMenuCommandInteraction
,command
:ContextMenuCommand
,context
:PreconditionContext
):AsyncPreconditionResult
Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:53
Parameters
Parameter | Type |
---|---|
interaction | ContextMenuCommandInteraction |
command | ContextMenuCommand |
context | PreconditionContext |
Returns
delete()
delete(
key
:string
):boolean
Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:86
Parameters
Parameter | Type |
---|---|
key | string |
Returns
boolean
true if an element in the Map existed and has been removed, or false if the element does not exist.
Overrides
Store.delete
messageRun()
messageRun(
message
:Message
,command
:MessageCommand
,context
:PreconditionContext
):AsyncPreconditionResult
Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:15
Parameters
Parameter | Type |
---|---|
message | Message |
command | MessageCommand |
context | PreconditionContext |
Returns
set()
set(
key
:string
,value
:Precondition
):this
Defined in: projects/framework/src/lib/structures/PreconditionStore.ts:74
Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
Parameters
Parameter | Type |
---|---|
key | string |
value | Precondition |
Returns
this
Overrides
Store.set