Programmable code with nightbot

Hey, Im new to using nightbot and was wondering how or if it is possible to use a language such as javascript to decide on nightbots return value for a command.

If there is a way to integrate this please let me know!

Thanks

Yes, you should probably find the answers to your questions on the $(urlfetch) variable documentation page https://docs.nightbot.tv/commands/variables/urlfetch

I guess I’m just too new to this to really get an understanding from that. I see how it works with custom apis, but is javascript supported with nightbot? and if it is, do I urlfetch to a straight javascript file hosted on a website?

Thanks again for helping

You cannot use JavaScript within HTML pages with Nightbot’s URLFetch variable. You must render a plain text response using a server-side scripting language, like NodeJS, PHP, etc.

1 Like

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