Example

Methods

staticrun(client, msg, cmd) → {string|boolean}

The part of the inhibitor that will determine if the user can use the command or not. This function must return one of three things.
If the user should be allowed to use the command, you will return false.
If the user should prevented from using the command, you will return true. If you do this, the command will be silent.
However, if you would like to give the user a message as to why they couldn't use the command, you can also return a String, such as `return "Not enough permissions to use this command."`.

Parameters:

Name

Type

Description

client

KomadaClient

The Komada Client

msg

Message

A Message object obtained from discord.js

cmd

Command

The command that the user is trying to run.

Returns:

string
|
boolean

Example

This will create an inhibitor that only runs when the commands "requiredUser" configuration property has the message authors id in it.