Queue command nightbot

Update: I made new queue commands that are more versatile and include a leave feature. Here is the website that generates the commands: https://vxrl.xyz/commands/queue

Go to https://twitch.center/customapi/quote/generate. You will see three lines. After token= on the first line, you will see your first token. After token= on the second and third lines, you will see your second token. Use these to replace FIRSTTOKEN and SECONDTOKEN before you add the following commands.

COMMANDS FROM THE ORIGINAL REPLY

!commands add !joinqueue -a=!joinqueueadder $(eval queueString = `$(urlfetch http://twitch.center/customapi/quote/list?token=FIRSTTOKEN)`; userExists = false; regex = /\d+\. (.*?) /g; while ((match = regex.exec(queueString)) !== null){if (match[1] === `$(user)`){userExists = true}} if (userExists) {"="} else {"=" + encodeURIComponent(`$(user) `)})

!commands add !joinqueueadder $(eval `$(urlfetch http://twitch.center/customapi/addquote?token=SECONDTOKEN&data$(query))`.includes("Successfully added entry") ? `$(user) was added to the viewer game queue` : `$(user) is already in the viewer game queue`)

!commands add !viewqueue $(eval (queueString = `$(urlfetch http://twitch.center/customapi/quote/list?token=FIRSTTOKEN)`) === "There are no quotes added" ? "The viewer game queue is empty" : queueString)

!commands add !popqueue -ul=moderator $(eval (removedViewer = `$(urlfetch http://twitch.center/customapi/delquote?token=SECONDTOKEN&data=1)`).includes("Successfully deleted entry") ? (removedViewer.substr(removedViewer.indexOf(":") + 1) + " was removed from the viewer game queue") : "The viewer game queue is already empty")

!commands add !clearqueue -ul=moderator $(eval if (`$(urlfetch http://twitch.center/customapi/quote/list?token=FIRSTTOKEN)` === "There are no quotes added"){"The viewer game queue is already empty"} else {`$(urlfetch http://twitch.center/customapi/delquote?token=SECONDTOKEN&clear=1)`; "The viewer game queue has been cleared"})
2 Likes