Class: CommandMessage

CommandMessage

The internal class that turns command arguments into command parameters

new CommandMessage(msg, cmd, prefix, prefixLength)

Parameters:
Name Type Description
msg external:Message The message this command message is for
cmd Command The command being run
prefix string The prefix the user used to run the command
prefixLength number The length of the prefix the user used to run the command
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L13

Properties


args :Array.<string>

The string arguments derived from the usageDelim of the command
Type:
  • Array.<string>
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L56

<readonly> client :KlasaClient

The client this CommandMessage was created with.
Type:
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L14

cmd :Command

The command being run
Type:
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L35

msg :external:Message

The message this command message is for
Type:
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L28

params :Array.<any>

The parameters resolved by this class
Type:
  • Array.<any>
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L63

prefix :string

The prefix used
Type:
  • string
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L42

prefixLength :number

The length of the prefix used
Type:
  • number
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L49

reprompted :boolean

If the command reprompted for missing args
Type:
  • boolean
Since:
  • 0.0.1
Source:
lib/structures/CommandMessage.js#L70