Properties

Below you will find all of the commands and orhter related properties excluding the events that are intergrated to Prodige.

Command Properties

ProdigeCommand

Property

Type

Description

Required

name

string

The name of the command

yes

run

The function that will run when the command is called

yes

args

An array of ProdigeArgument objects

no

aliases

Array<string>

An array strings that designates the command aliases be careful of duplicates between commands

no

cooldown

A ProdigeCooldown object to enable a cooldown

no

channels

Array<number>

Array of the channesl ids of wich the command can only be executed in

no

roles

Array<number>

Array of the roles ids of wich the command can only be executed by

v

permissions

The permissions flags the user needs to run the command

no

deleteMessage

boolean

If the message that contains the command should be deleted right after

no

ownerOnly

boolean

If the command is only executable by the ownerId specified in the config

no

ProdigeRunFunction

Property

Type

Description

client

Prodige

The main Prodige class

message

Message

Message object from discord.js

args

Record<Stringn unknown> | undefined

Array of all the arguments as you expected them

command

ProdigeCommand

ProdigeCommand object

ProdigeArgument

Property

Type

Description

Required

name

string

Argument name (must be unique)

yes

type

ProdigeArgumentType | ProdigeChannelType

Type of argument expected

yes

required

boolean

If the argument is required or not

no

byDefault

any

A default value for the argument if not required and not specified by the user

no

ProdigeCooldown

Property

Type

Description

Required

delay

delay

The delay between each command in milliseconds

yes

run

Array<string>

Array of the roles ids of wich the command cooldown must be bypassed

no

Event Properties

ProdigeEvent

Property

Type

Description

Required

name

ClientEvents | "prodigeError"

Name of the event

yes

run

async (client, args)

The function when the event is emitted

yes

Last updated