NightDev Community Forums

[CustomAPI] Quote system


It does have to be at the start, but you can remove the ! if you’d like from the command name.

try typing !chrystalball list which gives you a link to all your entries. If it’s in there, it should show up. If you can show through thorough testing that it doesn’t, then there’s a bug which I’ll try to fix.


Feel free to have a look at Twitch
The list is shown if you type !chrystalball list

Edit: fixed the ‘!’


Looks like you got the ! working, and in my trials, it seems to get all 11 of your quotes?


@ehsankia In a quote list of 7 quotes the commands “!quote -7” to “!quote -1” access the quotes saved in the spots 1 to 7 respectively with the numbers -6 to 0 associated to the quotes. Additionally “!quote 0” always seems to access the last quote in the same way “!quote -1” does. I assume this behaviour is the same for any length list, although I have not tested it further.

The “!quote” command also accessed the last quote with the displayed index 0 once, that was immediately after I had added that exact quote and I have not (yet) seen it happen again.

This really is a non issue, just thought it interesting when I tested the system and mayber something that’s easy to fix.

Either way thanks for the work on this!


Negative index working backward is a feature. It was for someone who wanted a command that always prints the last quote, so I added -1, and also made negative numbers index from the end of the list. And yes it works on any size of course.

I’ll have to look at the code but I’m not sure if index 0 has a well defined behavior.


Is it possible to get multiple results from our !command [keyword(s)] intead of just the most recent matching?


I don’t think it’s the most recent, I’m pretty sure I had it so it randomizes between all matching results.

So if you have 5 quotes containing “banana” and you type “!quote banana” you’ll get one of the 5 at random every time. if you’re looking for a more specific quote, try typing more keywords?

Multiple doesn’t quote work. Quotes are limited to 400 character, which is also what happens to be roughly the limit for a single twitch message, so returning multiple doesn’t work. Also, the bot api only let’s us return a single reply, not multiple. We also wouldn’t want nightbot to spam 20 quotes in a row either.


I get it, for me i’m using it to store clips. so I’d like a search to return a few clips with matching keywords, but its cool I understand. at least i know its random now :smiley:


Is there anyway I can edit quotes? I have my quotes set up chronologically and sometimes I make mistakes but can’t edit it. If I delete the quote and re-add it, it’ll be last and it’ll look weird as some quotes before it would have later dates!

Is there a way to search for a number? When I do !quote 10 it brings up the quote in 10th position but I want it to bring up the quote containing 10!

If some could help me to do any of the things above I’d be grateful!


Add a !editquote command similar to !addquote but to the /editquote endpoint in the api. Then do

!editquote 5 new quote

to edit the 5th quote


Ok thanks, but do you know if their is a way to do the second thing?


There’s no way sadly


Oh ok! Is there any chance that you’d implement it, or no?


hey am lost after make the command !editquote what messgae to i put in


@n_th_nd Doubtful, there’s no clean way of doing it.
@dreadmoney302 This is advanced customapi setup and it’s kinda beyond the scope of this thread.


Is there any chance that you could send me the code with instructions on how to edit it (or preferably with the changes already made)?


could there be a way to show the total of quotes without having to go to the quote list every time?


You mean a command to show the number of quotes?


Basically yes. Just a command to show total quotes made


Alright, added !quote # that gives you the count of entries added.