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);
Name | Type | Description | Default | Optional |
---|---|---|---|---|
client | ShewenyClient | The client | None | No |
options | ModalsManagerOptions | The options of the manager | None | No |
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 :
Name | Type | Description |
---|---|---|
interaction | CommandInteraction | The interaction |
time | Number | The time before run again |