[CustomAPI] Quote system

Is there a way I can make part of the custom message the quote

$(eval `$(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=TEXT $(querystring))`;decodeURIComponent(`$(querystring)`))

so where would I put the rest of the text i want? Also can you do the same thing for the message that comes up when you delete a quote.

Also is it possibe for the quote number to me in the message. Example: Quote 5 has been deleted.

do you want me to just tell you exactly what I want and you can tell me if it is possible.

Yeah, tell me what you want exactly so I can help out.

@RokettoJanpu any ideas???

@RokettoJanpu Whenever I add a quote the decodeURIComponent is in the message.

I think this is the right quote API for nightbot since it seems to be one, but I just found a fun bug on a streamer’s nightbot quote system - haven’t tested it on other streamers yet. I forgot that !quote is how you get random ones, so I put “!quote random”, which somehow returns a quote at the index of 0 that corresponds to the latest quote. From there, -1 returns either invalid index message OR returns 0, -2 returns “-1” which returns the quote added right before last (so last - 1, last - 2, last - 3, etc.).

So to show an example based on my tests, here is what I have been experiencing/experimenting with, using example quotes of #7 = “mary”, #8 = “steve” as most recent and #1 = “bob” as first, which aren’t the quotes on the stream I was watching, but will suffice.

Username: !quote 8
Nightbot: 8. steve

Username: !quote 1
Nightbot: 1. bob

Username: !quote <any string/char that is not contained in a quote, such as random, null, fourtwenty, 2+2, etc. I tested a lot of random things)
Nightbot: 0. steve

Username !quote 0 (or 0.8, or any other decimal number such at 0.24 and 5.6)
Nightbot: 0. steve

Username: !quote -1
Nightbot: 0. steve
OR
Nightbot: No matching entry found

Username: !quote -2
Nightbot: -1. mary

Username: !quote -8
Nightbot: -7. bob

Username: !quote -9
Nightbot: No matching entry found

So basically, something’s weird with how invalid indices are being handled. Quotes that contain specified words work as intended and the list command is not showing these magical negative indices.

If this isn’t the right API, though the commands listed on this page work, then oh well, at least I tried to bug report lmao

is there any way to add a lot of quotes at once? like on a tab you can add like a hundred quotes at once, because i’m using this as a !randomfact command so i wan’t as much facts as possible.

I accidentaly deleted the quote 1 from a channel, and we have 1400 quotes, it’s basically impossible to remake the whole list for a single quote.

Is there a way to add a quote as number 1?

My friend’s channel seems to be having issues with quotes getting eaten by some strange bug. At random, a quote will be either:

  1. Entered as normal
  2. Replaced with "$(querystring)
  3. Entered as normal, but skipping an entry leaving the one before it as "$(querystring)

After experimentation, it seems completely unaffected by whether the quote contains any quotation marks or any other variable on our end. It seems like some kind of backend issue.

It’s possible that old quotes have also been affected by this, as the issue goes as far back as quote #12 (she has 96 entries), but we’ve yet to actually confirm this.

Give me the public quote list I’ll take a look at the logs

https://twitch.center/customapi/quote/list?token=0a7ad944

Sorry about the delayed reply!

Looks like you’re sending requests to my server from both Nightbot and StreamElements. You must’ve added the !addquote command to both. The latter obviously doesn’t understand $(querystring), which is why you’re ending up with duplicate broken quotes. You need to remove the quote commands from streamelements or replace $(querystring) with the equivalent there.

Any time I try to add a quote, I get the response “[Error: Bad Response Status “403”]”. I don’t understand what’s wrong

Are you using nightbot?

I’m using Botisimo, with the syntax replaced to work with Botisimo. Does the API only accept responses from Nightbot?

Someone keeps spamming with Botisimo and getting it ip banned on my server. I can unban it for now but in general, I recommend just using Nightbot for quote system

What would happen if someone used Nightbot to spam the system? Isn’t there some sort of precaution to stop user specific attacks instead of entire services? I’m asking genuinely, because I really don’t know

nightbot itself has better spam prevention, whereas some other bots don’t.