ButtonsManager
Create an handler for bot buttons. The buttons can be in as many subfolders as desired and there may be other files exporting something else.
Constructor
js
new ButtonsManager(client, options);
Name | Type | Description | Default | Optional |
---|---|---|---|---|
client | ShewenyClient | The client | None | No |
options | ButtonsManagerOptions | The options of the manager | None | No |
Events
Properties
buttons
The collection of loaded buttons.
Return : Collection<Button>
client
The framework client.
Return : ShewenyClient
directory
The directory of buttons.
Return : String
Methods
loadAll()
Load all buttons in directory of buttons.
Return : Promise<Collection<Array<String>, Button>>
unloadAll()
Unload all buttons.
Return : void
Events
cooldownLimit
Emitted when user hit the cooldown limit.
Parameters :
Name | Type | Description |
---|---|---|
interaction | ButtonInteraction | The interaction |
time | Number | The time before run again |