Skip to content
On this page

ModalsManager

Create an handler for bot modals. The modals can be in as many subfolders as desired and there may be other files exporting something else.

Constructor

js
new ModalsManager(client, options);
NameTypeDescriptionDefaultOptional
clientShewenyClientThe clientNoneNo
optionsModalsManagerOptionsThe options of the managerNoneNo
Properties
Methods
Events

Properties

modals

The collection of loaded modals.

Return : Collection<Modal>

client

The framework client.

Return : ShewenyClient

directory

The directory of modals.

Return : String

Methods

loadAll()

Load all modals in directory of modals.

Return : Promise<Collection<Array<String>, Modal>>

unloadAll()

Unload all modals.

Return : void

Events

cooldownLimit

Emitted when user hit the cooldown limit.

Parameters :

NameTypeDescription
interactionCommandInteractionThe interaction
timeNumberThe time before run again