Changing nightbots reply

Asked May 1, 2023·2 replies·Last activity 3 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 have a weather command set up in chat
when a location isnt provided, nightbot replies with "No location provided", is it possible to edit this reply and customise it?

2 replies

Hey @Dapper Raccoon!

Yes you can, using $(eval):

$(eval w = '$(weather $(query))'; w === 'No location provided' ? 'YOUR_REPLACEMENT_RESPONSE' : w;)
Polar Cat said:
$(eval w = '$(weather $(query))'; w === 'No location provided' ? 'YOUR_REPLACEMENT_RESPONSE' : w;)

Ahh thank you so much! :)