NightDev Community Forums

[CustomAPI] Quote system

but can i get unban? i used for twitch and then i tried in unity, i love this custom api :’<

first of all thank you for this commands. they are amazing. both chat and streamer are having so much fun.

is there anyway to see all quotes? list or something like that

Hey @spectvil!

Yes, use this URL:

http://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN

Replace PUBLIC_TOKEN with the 8 characters long token that’s in your quote command (not addquote, delquote, or editquote).

1 Like

Okay, so with the option to view that list, is there anyway to do a mass edit on that list page?

To my knowledge the edit quote function can only edit one qoute at a time I’m not saying for certain that he hasn’t added one but to my knowledge this is not a function of the API

Yeah i mean i don’t know either. I found a way to download the list file as is, but theres no way to reupload it, i thought with the ability to see the complete list wed have the ability to edit it as a whole. But who knows. Corssing my finger for a reply.

Hey @OneLostHero!

I had to manually edit entire quote lists a few times because we changed how we formatted our quotes, with around 200+ entries each time, so far there’s no other way to do it, sorry.

If you’ve got a really convincing reason why such a thing is crucial for a quote system (beyond it’s cool to have) i can add it, but in general I prefer staying away from this being a generic database system because it’s not meant to be and people tend to abuse it as such.

1 Like

tl;dr do server bans wear off?

So, I was trying to set up a quote list as a companion to a different, prior list so that the context behind the quote could be stored so that the context doesn’t show up in the list view. However, since I need to backdate the new list entries, I planned on using a filler text and editing my way through the list, so I needed the new one to be the same length as the old one. I tried to do this quickly (not realizing that this is basically a DOS attack) by reloading the fetch url repeatedly in my browser. Unsurprisingly, now I only get 403 errors. Firstly, sorry about that, and secondly, can this be undone, and if so, how?

they don’t wear off. DM me your IP and if your story holds up I’ll unblock it.

This is a really nice quote system you made. I just had a question.
So I have the !quote command, and when I used it it will give a random quote out of the list of quotes I have. The only problem is I also have a timer on. So that after a certain time the bot will use the command, but so far he only repeats the first quote over and over and not the other ones. If I type !quote myself then there is no issue and it gives a different quote. What do I do?

Hey @z4nku!

Make sure the timer’s Message field is empty and that the Alias is set to !quote.

Hi there! I’ve added ten quotes to my !quote command (which I renamed !bhm). I know they were all added successfully, because the bot told me. But when I use my command, I get, “There are no quotes added.” The command I’m using is $(urlfetch https ://twitch.center/customapi/quote?token=[…]&data=$(querystring)). I entered it in Nightbot as a custom command, and I’m trying to trigger it in my Streamlabs chat. What the heck’s going on?

aloha, i have a suggestion… hope it’s not too much trouble… but i love how u added the negative numbers to call quotes from the end of the list… my suggestion is, to allow editquote to use the negative numbers too and maybe delquote as well ^^

u can replace the
$(querystring)
with
$(eval "$(querystring)".replace('%40',''))

u could create a second quote system and then for your “!quote” command use…
$(eval a="$(urlfetch https://twitch.center/customapi/quote?token=TOKENONE&data=$(querystring))";b="$(urlfetch https://twitch.center/customapi/quote?token=TOKENTWO&data=$(querystring))";r=[a,b];d=r[Math.floor(Math.random()*r.length)];if(a[0]==0){d=b};if(b[0]==0){d=a};""+d)
being sure to replace TOKENONE with the 8 digit token from the current quote system and TOKENTWO with the new 8 digit token from the second quote system :wink:

NOTE: this will successfully retrieve a quote at random, or search by words… but if u try to search by quote number u may or may not get the one u want…
if u would like search by number functionality i can do it, but it’ll require a 2nd command linked by alias…
first command (i would name it “!quote”)…

$(eval a="$(querystring)";b=a;if(a==a*1){c=a*1;if(c>2000){a=0;b=c-2000}else{b=0}};""+a+" "+b)

and for the second command linked by alias (i would name it “!quotepart2”)…

$(eval a="$(urlfetch https://twitch.center/customapi/quote?token=TOKENONE&data=$(1))";b="$(urlfetch https://twitch.center/customapi/quote?token=TOKENTWO&data=$(2))";r=[a,b];d=r[Math.floor(Math.random()*r.length)];if(a[0]==0){d=b};if(b[0]==0){d=a};""+d)

little late but added this today for delquote and editquote, let me know if it works as expected.

1 Like

Is there a limit of 2k qoutes on the list? And if there is in there any way to make it so it deletes the first qoute and adds a new one?

i’m not sure about the limit, never had that many… but if u do hit a limit (only do this after hitting the limit or u will erase the first ones for no reason)

for your addquote command, u can do it 2 ways…

the first way will tell u what quote is being deleted…
$(urlfetch https://twitch.center/customapi/delquote?token=YOURTOKEN&data=1) $(urlfetch https://twitch.center/customapi/addquote?token=YOURTOKEN&data=$(querystring))

if u don’t wanna see that, or if u have really long quotes that will trigger the over 400 character limit error, the second way will not tell u what’s being deleted…
$(eval "$(urlfetch https://twitch.center/customapi/delquote?token=YOURTOKEN&data=1)";"$(urlfetch https://twitch.center/customapi/addquote?token=YOURTOKEN&data=$(querystring))")

in either case make sure u replace the “YOURTOKEN” with the alphanumeric token already in your addquote command

Yes there is a limit, mostly to reduce abuse. If you have a legitimate usecase, message me and I can increase your limit.