Modal
Represents a Modal.
Constructor
js
new Modal(client, options);
Name | Type | Description | Default | Optional |
---|---|---|---|---|
client | ShewenyClient | The client. | None | No |
customId | Array<String | RegExp> | The list of modals ids | None | ✓ |
options | ModalOptions | The options. | None | ✓ |
Properties
client
The framework client.
Return : ShewenyClient
cooldown
The cooldown of the modal (in seconds).
customId
The custom id(s) of the modal.
Return : Array<String | RegExp>
enabled
If this structure is enabled or not.
manager
The manager of this structure.
Return : ModalsManager
path
The path of the file.
Return : String
Methods
before()
Executed before modal(s) checks.
Parameters :
Name | Type | Description |
---|---|---|
interaction | ModalInteraction | The interaction |
Return : Promise<any> | any
[abstract] execute()
The execution of modal(s).
Parameters :
Name | Type | Description |
---|---|---|
interaction | ModalInteraction | The interaction |
Return : Promise<any> | any
[async] register()
Register the modal.
Return : Promise<Modal> | Null
[async] reload()
Reload a modal of bot.
Return : Promise<Modal> | Null
unregister()
Unregister a modal from the bot.
Return : Boolean