Skip to content
On this page

Modal

Represents a Modal.

Constructor

js
new Modal(client, options);
NameTypeDescriptionDefaultOptional
clientShewenyClientThe client.NoneNo
customIdArray<String | RegExp>The list of modals idsNone
optionsModalOptionsThe options.None
Properties
Methods

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 :

NameTypeDescription
interactionModalInteractionThe interaction

Return : Promise<any> | any

[abstract] execute()

The execution of modal(s).

Parameters :

NameTypeDescription
interactionModalInteractionThe 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