$cmd
A `Compact Function` with `7` options to choose from.

FUNCTION USAGE

  • $cmd
  • $cmd[commandName;option]

Properties:

commandName - Define the command with a command name. option - Define the property by its name.
No brackets will return the command name of the command being used.
undefined is returned when the option data cannot be fetched.

Options:

  1. 1.
    aliases
  2. 2.
    description
  3. 3.
    error
  4. 4.
    exists
  5. 5.
    name
  6. 6.
    status
  7. 7.
    usage
aliases
description
error
exists
name
status
usage

Returns a command's aliases.

Returns a command's description.

Returns the error message for a command.

Returns true if the defined command exists in the bot. Otherwise, bot returns false.

Returns a command's name

Returns the status of a command.

Returns a command's usage.

Example 1: Output will be "Just a test command".

bot.Command({
name: "test",
aliases: ["t"],
description: "Just a test command",
code: `
$cmd[test;description]
`
})

Example 2: Output will be "Just a test command".

bot.Command({
name: "test",
aliases: ["t"],
description: "Just a test command",
code: `
$cmd[;description]
`
})

Example 3: Output will be "test".

bot.Command({
name: "test",
aliases: ["t"],
description: "Just a test command",
code: `
$cmd
`
})
Last modified 1yr ago
Copy link