Specific responses to specific words

Asked May 28, 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.

Hey community, how are you all?
I was wondering if I can create a command without the [!].
My example is for Hearthstone.
When someone says: "Priest is cancer".
I was wondering if Nighbot can answer:
"This is an advice, next time is a ban".
But not if person says only "Priest" or "Cancer".

2 replies

Hey @Rusty Whale!

Yes, it's possible:

!addcom priest $(eval q=decodeURIComponent(`$(querystring)`).toLowerCase();q.includes(`cancer`)?`This is an advice, next time is a ban.`:` `)