Nightbot won’t respond for sentences withspace

Asked Jul 5, 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.

I can’t make nightbot respon to how old are you but he can respond if i remove the spaces what the viewer won’t say howoldareyou!
Can i do something for that ?

2 replies

No, nightbot will only respond to the first word - it isn't a keyword based system, just a "without a prefix" system.

Hey @Mossy Lobster!

The solution to this is to create a how command and check for the content following the trigger word, aka the query, so here's how to do it in your case:

!addcom how $(eval `$(query)`.toLowerCase().includes(`old are you`)?`YOUR_AGE_TEXT`:` `;)