Inhibitor
Represents an inhibitor.
Constructor
js
new Inhibitor(client, options);
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| client | ShewenyClient | The client. | None | |
| name | String | The name of the inhibitor. | None | |
| options | InhibitorOptions | The options of the inhibitor | None |
Properties
client- The client.path- The file path of the event.name- The name of the event.type- The type of the inhibitor.priority- The priority of the inhibitor.
client
The framework client.
Return : ShewenyClient
enabled
If this structure is enabled or not.
manager
The manager of this structure.
Return : InhibitorsManager
name
The name of the inhibitor.
Return : String
path
The path of the file.
Return : String
priority
The priority of the inhibitor.
Return : Number
type
The type of the inhibitor.
Return : InhibitorTypeResolvable
Methods
[abstract] execute()
The execution of inhibitor.
Parameters :
| Name | Type | Description |
|---|---|---|
| structure | Button, Command, Event, Inhibitor, Modal, SelectMenu | The context |
| ctx | Interaction or Message | The context |
Return : Promise<any> | any
[abstract] onFailure()
The execution if inhibitor has failed.
Parameters :
| Name | Type | Description |
|---|---|---|
| structure | Button, Command, Event, Inhibitor, Modal, SelectMenu | The context |
| ctx | Interaction or Message | The context |
Return : Promise<any> | any
[async] register()
Register the inhibotor.
Return : Promise<Inhibitor> | Null
[async] reload()
Reload a inhibotor.
Return : Promise<Inhibitor> | Null
unregister()
Unregister a inhibitor from the bot.
Return : Boolean