Variable for "Command Name Used"?

Heya all :slight_smile:

Is there a way to get the command name that was used, as a variable ?

A friend has an API that has 2 input variables and wants to return a “Correct Usage” message if parameters do not make sense for instance. The thing is that the command name people might use on their own stream is variable.

l.e. If someone has the command set as being !getstats, the API would reply with:
Please try again - Correct usage is “!getstats [username] [servername]”

I know it could be done manually with the url e.g.

?command=%21getstats

but that is messy.
It would be much neater to be able to do something like:

?command=$(commandused)

Many thanks,

Zoe

EDIT: Changed the OP to explain better

This would be a useful addition, I would like this to. @night would that be possible?

1 Like

You can now use the variable $(command) to get the current command being executed.

If you need to reconstruct the full message, you can also do so with $(command) $(query).

3 Likes

Cool, thanks Night! :slight_smile:

Neat :star_struck: Thanks so much :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.