[CustomAPI] Quote system

Thank you for a quick response! I’m a little confused though, there the “…” is, would that be where I put the # for it to show #3 instead of just 3.?

You can use Nightbot’s eval variable to strip the # character from the query.

Quote #$(urlfetch http://twitch.center/customapi/quote?token=YOURPUBLICTOKEN&data$(eval "="+encodeURIComponent(decodeURIComponent("$(querystring)").replace(/#/g,""))))

Replace YOURPUBLICTOKEN with the token in your existing !quote command, which you can find here: https://beta.nightbot.tv/commands/custom

@andywall No. The ... part is just for the rest of the quote custom API link. What this does:

Quote #$(urlfetch http://twitch.center/customapi/...)

It will automatically put a “Quote #” in front of the quote when you use the !quote command.

Oh! ok, thanks so much, my streamer will thank you greatly :smiley:

There is an issue related to your property to connect with opera support that solves all the problem and give you clear access to all the things that you need.

Hi thanks for making this. I am moderating a few Twitch Channels and I have added your quote API to add all the clip commands created for a specific channel to pull a random clip so viewers can have fun without needing to remember all the commands. The commands are listed correctly on the Token and Nighbot pulls the randomclip command correctly so it comes back for example a quote like !rage1 . The issue is I want that quote to actually execute the command into Nighbot now it just pulls it as text without executing the command a user needs to input into the chat the actual !rage1 command to work. This is what I use in the Nightbot command. Can you recommend what needs to be changed to make this work or is it not possible?

$(urlfetch http://twitch.center/customapi/quote?token=80550788&data=$(querystring)&no_id=1)

hey, is there a way to export the quotelist to google spreadshet?

i Have a List running and i would like to know if there is way to make a command like !Upnext===1 on the list … So Nightbot will post in chat something like Upnext is #1 Name ,is that possible

@Zion_Cage Do you mean you want Nightbot to always output the 1st entry? Or output the 1st entry the 1st time the command is used, the 2nd entry the 2nd time, 3rd the 3rd time, etc?

I want it to always be the first the fist Entry … u see i have a Listing system … we play squads … So we Pick 3 People from the list at a time … If i could get Nightbot to Reply with the first 1,2,3 Entries in chat … That would be awesome … If not i would like nightbot to reply with only #1 entry always

@Zion_Cage This is the command response you want then. Replace PUBLIC_TOKEN with your public token (8 characters):

$(urlfetch http://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&data=1&no_id=1), $(urlfetch http://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&data=2&no_id=1), $(urlfetch http://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&data=3&no_id=1)

Thank u very Much , Hope u A bless day

It Working But it is reading Out the Entire List … Is it possible for it just to read 1-3 Entries ??

@Zion_Cage My bad, try this:

$(urlfetch http://twitch.center/customapi/quote?token=publicTokenHere&data=1&no_id=1), $(urlfetch http://twitch.center/customapi/quote?token=publicTokenHere&data=2&no_id=1), $(urlfetch http://twitch.center/customapi/quote?token=publicTokenHere&data=3&no_id=1)

After popular demand, I’ve added a way to recover your public key using your private key:
https://twitch.center/customapi/quote/recover?token=PRIVATE_KEY_HERE

This is for occasions where you accidentally delete your !quote command, but still have access to either !addquote or !delquote, from which you can extract your private key. As always, makes sure to keep your private key secret.

This is mostly for mods and other people around this forum helping fellow nightbot users. I’ve gotten quite a lot of requests for manually recovering lost public keys. If someone is trying to recover their quotes, you can quickly point them to this instead.

Cheers.

2 Likes

Iam helping a Streamer with this Quote command, but the !quote List has’nt been added through the Automated install for some reason, can you add it manualy, if so how?

@robepower

I assume you’ve already got the public and private tokens. If not go here https://twitch.center/customapi/quote/generate Copy down the public token (8 characters long) and private token (16 characters long) and keep them somewhere safe. There are 4 quotes set up below:

!quote which returns a random quote
!addquote which adds a quote to the list (mod-only)
!delquote which removes a quote from the list (mod-only)
!quotelist which gives a link to the quote list

Copy and paste these commands into the chat to create these commands. Feel free to rename the commands however you wish. Be sure to replace publicTokenHere with your public token and privateTokenHere with your private token:

!addcom -cd=5 !quote $(urlfetch http://twitch.center/customapi/quote?token=publicTokenHere&data=$(querystring))
!addcom -ul=mod !addquote $(urlfetch http://twitch.center/customapi/addquote?token=privateTokenHere&data=$(querystring))
!addcom -ul=mod !delquote $(urlfetch http://twitch.center/customapi/delquote?token=privateTokenHere&data=$(querystring))
!addcom -cd=5 !quotelist $(channel)'s quote list: http://twitch.center/customapi/quote/list?token=publicTokenHere

Yes, or i hope at least, the other quote commands work, just not the list,

I test your sugestion, will return i a moment when i have tried it out, thanks for reaching out to Me @RokettoJanpu

I am trying to help a streamer I moderate for use this amazing quote API as a song request queue, but not in a normal fashion. The main issue I am running into is being able to display the list in a “prettier” package than what the link provides. Is there anyway to do one of the following:

  1. Have the commands build the list in a Google Doc or Sheet (or export the list to one)
  2. Have the list be able to be called from the streamers personal website (hosted by Squarespace) in order for it to be formatted there. (I’m not very code savvy; but another moderator is trying to setup a webpage for the streamer on the streamer’s website that will call the list so it can be formatted but he receives the error: “Access to XMLHttpRequest at ‘https://twitch.center/customapi/quote/list?token=PUBLICTOKENHERE’ from origin ‘http://localhost’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.” and we are unable to get passed that issue).
  3. Customize the way the list page looks when opened by viewers who click on the link provided by !quote list.

Any and all help is appreciated.

I deleted my !addquote and !delquote commands. I have my public token. How do I retrieve my private token? I want to keep adding to my list without starting all over with a new quote list. However, if this is what I have to do, will the other list delete after a while? How long? Thank you.