CommandPath
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 somethingReturns 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 somethingLink 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 3For a slash command such as /tag info, this would be 2For a slash command such as /say, this would be 1Link copied to clipboard
Returns the parent path of this command path For a slash command such as
/show me something, this would be /show meFor a slash command such as /tag info, this would be /tagFor a slash command such as /say, this would be nullLink copied to clipboard
Returns the subcommand name of this command path For a slash command such as
/show me something, this would be somethingFor a slash command such as /tag info, this would be infoLink copied to clipboard
Returns whether this command path starts with the supplied command path For example
/show me something starts with /show me