Skip to content
On this page

Inhibitor

Represents an inhibitor.

Constructor

js
new Inhibitor(client, options);
NameTypeDescriptionDefaultOptional
clientShewenyClientThe client.None
nameStringThe name of the inhibitor.None
optionsInhibitorOptionsThe options of the inhibitorNone
Properties
Methods

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 :

NameTypeDescription
structureButton, Command, Event, Inhibitor, Modal, SelectMenuThe context
ctxInteraction or MessageThe context

Return : Promise<any> | any

[abstract] onFailure()

The execution if inhibitor has failed.

Parameters :

NameTypeDescription
structureButton, Command, Event, Inhibitor, Modal, SelectMenuThe context
ctxInteraction or MessageThe 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