Count arguments and only send if equal to 0

Asked Mar 18, 2020·2 replies·Last activity 6 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.

Hello. I've recently been searching for a way to count the arguments in a command, and I found it, but it only sends a text with the number of arguments. What I want is that the command only executes if the argument count is 0. Can someone help me with this?

2 replies

You can output a whitespace if the query is nonempty which results in Nightbot not actually saying anything in chat, and output the normal response if the query is empty.

$(eval decodeURIComponent(`$(querystring)`)?` `:`normal response`)