Page cover

Debugger

Represents the debugger client

Constructor

new Debugger(client, options);
PARAMETER
TYPE
DESCRIPTION
OPTIONAL

client

discord.js Client instance

options

Debugger options

Properties

.owners

Array of owner IDs Type: Snowflake[]

.client

discord.js Client instance Type: Client

.options

Debugger Options Type: ?Options

Methods

.messageRun(message, args?)

Runs the debugger instance for message commands

PARAMETER
TYPE
DETAILS
OPTIONAL

message

discord.js Message instance

args

Message args, including sub command

Returns: Promise<Message>

Examples:

if (message.content.startsWith('!debug')) {
    args = message.content.split(' ').slice(1);
    await Debugger.messageRun(message, args);
}

.addOwner(id)

Recommended: !debug owners add <id>

Add a userId to the owners array

PARAMETER
TYPE
DETAILS
OPTIONAL

id

User ID

Returns: string[]

Examples:

const owners = Debugger.addOwner('923925375657082931');
console.log(`Owners: ${owners}`);

.removeOwner(id)

Recommended: !debug owners remove <id>

Remove a userId from the owners array

PARAMETER
TYPE
DETAILS
OPTIONAL

id

User ID

Returns: string[]

Examples:

const owners = Debugger.removeOwner('923925375657082931');
console.log(`Owners: ${owners}`);

Last updated