Mute Nightbot response to URLFetch

Hello, I’m using the URLFetch function which works wonderfully but I’d like to “mute” the response. I see a previous request from 2016 where the appropriate response was to reply with a " " (space). I tried that along with an empty string and a null but each time, NightBot responded.

Is there a new way to let Nightbot know to not respond in chat to a URLFetch command?

Hiya, that is still the correct way to supress the response. What does Nightbot respond with in your case?

1 Like

I’ve got it open now, so I’ll run a few tests and display the responses here:

API Response: " ", Nightbot Chat Response: image

And here is a null response:

API Response: null, Nightbot Chat Response: image

And just in case I messed something up in the command, here is the command text:
$(urlfetch json$(querystring))

Is this your API, are you returning an XML response (from what I see when I visit your link)?

You can use the $(urlfetch) variable without the JSON parameter before it, if the API just returns plain text.
The JSON parameter is to fetch JSON data which can be used inside an $(eval) function to filter out the data you want.

You can close this. I figured out that .NET was auto-researializing the text. I hand formatted the response to text-only and confirmed that Nightbot no longer responds. Thanks for your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.