Skip to content

Arguments

This data type describes the custom command arguments and options.

Properties

PropertyTypeDescription
valueStringOriginal message string of command invocation.
argsList<String>List of the arguments extracted from the string and split by whitespace.
targetMemberMember
  • If invoked by Text Command — first mentioned member or member with the id, specified as first argument;
  • If invoked by Member Context Menu — menu owner;
  • If invoked by Message Context Menu — message author;
  • If invoked by Slash Command — any member specified as parameter.

Methods

get(Position)

Returns argument by its position.

Returns: String

after(Position)

Returns all the arguments after position specified.

Returns: String

before(Position)

Returns all the arguments before position specified.

Returns: String

range(Start, End)

Returns arguments from specified range.

Returns: String

getOption(Name)

getOptionsByType(Type)

All rights sniffed.