Command Path
Represents a path of a command, each path component is delimited with a space, it is the same representation as JDA commands paths given in getFullCommandName. The different components are name, group and subcommand. This is mainly a utility class to avoid manipulating strings
Functions
Link copied to clipboard
Returns the full encoded path of this command path Each path component is joined with a space delimiter For a slash command such as
/show me something
, this would be show me something
Returns the full path with the specified separator.
Link copied to clipboard
Returns the right-most name of this command path For a slash command such as
/show me something
, this would be something
Link copied to clipboard
Returns the number of path components of this command path For a slash command such as
/show me something
, this would be 3
For a slash command such as /tag info
, this would be 2
For a slash command such as /say
, this would be 1
Link copied to clipboard
Returns the parent path of this command path For a slash command such as
/show me something
, this would be /show me
For a slash command such as /tag info
, this would be /tag
For a slash command such as /say
, this would be null
Link copied to clipboard
Returns the subcommand name of this command path For a slash command such as
/show me something
, this would be something
For a slash command such as /tag info
, this would be info
Link copied to clipboard
Returns whether this command path starts with the supplied command path For example
/show me something
starts with /show me