Hello everyone,
I’m experiencing an issue integrating my Google Apps Script API with Nightbot. The script is designed to manage a queue for playing with viewers across multiple Twitch channels. It functions well when tested directly in the browser, but when I try to use the !list command in Nightbot, I encounter this error:
[Response must be less than 400 characters]
Script Details:
The script handles various actions, including join, leave, list, tipupdate, and next, to efficiently manage the viewer queue across multiple channels. Here’s the full code for reference: https://pastebin.com/2sDTwhWM
Nightbot Commands:
Below are the Nightbot commands I’m using, with the API URL replaced by YOUR_CODE:
Join Command:
!join $(urlfetch https://script.google.com/macros/s/YOUR_CODE/exec?action=join&user=$(user)&channel=$(channel)&userlevel=$(userlevel)&tip=0)
Leave Command:
!leave $(urlfetch https://script.google.com/macros/s/YOUR_CODE/exec?action=leave&user=$(user)&channel=$(channel))
List Command:
!list $(urlfetch https://script.google.com/macros/s/YOUR_CODE/exec?action=list)
Tip Update Command (Moderators Only):
!tipupdate $(urlfetch https://script.google.com/macros/s/YOUR_CODE/exec?action=tipupdate&user=$(user)&tip=$(query))
Next Command (Moderators Only):
!next $(urlfetch https://script.google.com/macros/s/YOUR_CODE/exec?action=next&userlevel=$(userlevel))
Problem:
When accessing the API URL directly in a browser, the script returns plain text responses as expected, such as:
The queue is currently empty.