Multiple words in a command

Asked Sep 6, 2020·3 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.
!editcom FIRST_WORD $(eval decodeURIComponent(`$(querystring)`).toLowerCase()==`REST_OF_THE_PHRASE`.toLowerCase()?`COMMAND_RESPONSE`:` `)

This command makes it so you can say something like "Hi Nightbot Hello" and Nightbot will see it as a command, but if you only say "Hi" nothing will happen. I was wondering if it was possible to make it so if the command was "Hi Nightbot" would I be able to link it to another command? For example, there is already a command "!Hello" would I be able to change COMMAND_RESPONSE to match whatever "!Hello" does?

3 replies

Well you can change the response to mirror what hello says but you can’t really alias it outerwise it will just activate hello.
So yes if you just type whatever hello does on command_response it should work

How would I go about making "Hi Nightbot Hello" an alias for !hello? or maybe i'm just reading the answer response wrong.

You would just want to copy and paste what hello says into the COMMAND_RESPONSE of “Hi Nightbot Hello” since unless hello has a check for words after the command it will always activate.