I wanted to know if there's a way to make nightbot respond to a greeting, I have a "hello" command, but the bot will respond if it's used in a sentence that is not a greeting making it kinda awkward...was wondering if there's a way to fix this
Custom Greeting Commands Help
5 replies
Hey @Stormy Deer!
Yes, just add a test before sending a reply, like this:
!editcom hello $(eval q=decodeURIComponent(`$(querystring)`).toLowerCase();q==``||q==`nightbot`||q==`volantem`?`Hello $(user)!`:` `;)
In this case Nightbot will only reply if someone says hello, hello Nightbot or hello volantem.
Polar Cat said:
```
!editcom hello $(eval q=decodeURIComponent($(querystring)).toLowerCase();q==`||q==nightbot||q==volantem?Hello $(user)!:`;)
```
Hey sorry for late reply...haven't had a chance to mess around in nightbot for a while. I tried it out and it works...but now it will show an emoji whenever I use "hello" in a sentence. Any way to fix that? Thanks for your help, really appreciate it! <3
I'm not sure why it's happening, if you haven't changed the code it shouldn't be an issue. I don't even know how Nightbot could be triggered if the "hello" is in the middle of a sentence since it's not able to detect words that aren't the first one.
I tested it again to make extra sure it was working as intended:

Didn't find your answer? The community is on Discord.
Ask on Discord