NightDev Community Forums

[CustomAPI] Quote system

$(eval d=$(urlfetch json\d+./g, -).split(-); t=0; d.forEach(e=>e==$(user)?t++:t); t>10?max:PRIVATE_TOKEN&data=$(user) - $(querystring):wink:

Hi there! :blush: is there any way to make the above command shorter? I’m using this on YouTube as well as twitch now. Working brilliantly on Twitch. But 23 characters too long for YouTube. The rest I’m using from this forum are great though.

It’s pretty compact as it is but I would suggest adding it through the nightbot dashboard to avoid the limit.

Is is correct that on !quote list at the end of the list there is a $(querystring))?

Hey @diebohne444!

If you mean the following command:


Yes, it’s normal, it’s useful to look for a specific quote through the entire list.

No. I opened up the quote list via “!quote list” in Chat and suddenly there was $(querystring)) in the list and when i wrote !quote 7 (where it was positioned) the Bot send that into Chat

Is there any way you can screenshot all of this so we understand better?
Both the screenshot of the chat and of your list.
Blur/mask the tokens if it’s the private token (16 characters).

Right now the list is clean, but before we hit the 10 Quotes it appeared a few times. I will send u a screenshot if it appears again.

did u happen to copy paste the “addquote” command into discord? … discord attempts to grab the site and display a preview, which causes everything after the = to be input into the quote list, and since discord isn’t nightbot, the command variables have no effect and just appear as text

That makes sense. I did copy paste it into my private Discord server, so that i have the links on demand if needed. Thanks a lot


Loving the command, thank you.

So I am using the command as a RAID list for Destiny. I have !addquote and !delquote aliased with !joinraid $(user) and !leaveraid $(user) so all it will do is pass their username to the list, or look for an entry with their username to remove. Really simple and exactly what I need.

However, what would be great is if running !joinraid twice for example could not post because there is already and entry (“quote”) that would be exactly the same.

Hopefully that makes sense. Is that even possible?

Also, is there a way to see TOTAL entries in the list? So like !quotes total would say there are 6 entries in the list, for example?

Hey @Oaks!

Yes you could have a !total command to know the length of the list if you add a comma after the name and then split the output of the $(urlfetch) with them, but I think the Queue API fits better your use case here.

I’m a mod for a friend with a growing quote list. Add and del quote commands work well, but I haven’t found anything in the forum how to add the edit command. Is there some magic that came up in this forum long ago or is the edit command a pipe dream?

I must maintain proper grammar and punctuation in this list. The ocd demands it.

EDIT: Is there a blanket way to edit quotes while a stream is offline?

Hey @jomojojo411!

To create an editquote command it’s simple, take your delquote or addquote command, and simply replace the delquote or addquote part with editquote.
And yes, you can edit quotes while the stream is offline, that is you’re on Twitch, you can’t on YouTube.

1 Like

Hey Emily, we did the thing but received a ‘No matching entry found’ feedback from the bot.

How do you edit quotes while off stream? I can totally take a red pen and go to town off stream.


Use !quote list to get the full list of quotes along with their entry numbers. You can use this as a reference to edit the quotes.
To use !editquote you need to specify the entry number first and then the updated text, so let’s say you want to update the 5th quote, you’d do it like this: !editquote 5 some updated text

is it currently possible to use !list along with a keyword query ?

!quote list birds returns a list (or URL to the list) filtered by the word “birds”
I tried but that did not work.

Hey @abomination!

It is not, but that would be an interesting feature.

Hey! I am using StreamElements for this amazing quotes system.

I am having only 1 issue with it. I can get the general code to work for addquote/delquote and for quote to show a random quote in the list. But I cannot workout for the life of me how to do !quote 75 and it tell me quote 75. I have tried numerous things from other comments here, but not any of them worked. Wondered if you have any information?

Thanks, Kimmy

Hey @theartofkimmy!

Sorry, but we only offer support on NightDev products on these forums, I suggest looking in the documentation of StreamElements for a replacement of the $(querystring) variable to replace the end of your !quote command, here’s the one that works with Nightbot:

1 Like

It seems like StreamElements chatbot already has a quote system, I’m curious why not try that instead?

Or maybe you are? Because I don’t really see anything in their documentation about custom apis.