NightDev Community Forums

[CustomAPI] Quote system


#309

Is there a way to edit the way the quote is structured?

I’d love to have it where you can write !addquote (user) (message)
so that it responds on the !quote command with #x (“message in quotations”) - (user) instead of x. (message)?

It just looks nicer to me and I didn’t want to get a second bot for the same function just so it looks the way I wanted it to.

Thanks for taking the time to read this!


#310

@nomnomfighter

Change your responses for !addquote and !quote as follows:

For !addquote: $(urlfetch http://twitch.center...&data=$(querystring) - $(user))
For !quote: #$(urlfetch http://twitch.center...)


#311

It doesn’t quite work right for my purposes, as it puts the user who added the command after the - essentially attributing the quote to them. What I’d hoped for was so that the first word after the !addquote command would be treated as the user who said it.

For example !addquote FunnyUser This is funny turning into #1 “This is funny” - FunnyUser. Instead, I get #1. FunnyUser This is funny - NomNomFighter.

Since only Mods can add quotes on my channel, a lot of quotes would be attributed to the wrong Users. Is there a way to change that?


#312

@nomnomfighter

If the usage for !addquote is:

!addquote [person who said quote] [quote]

Then adjust the response for !addquote like so:

$(urlfetch http://twitch.center...&data=$(eval a=decodeURIComponent(`$(querystring)`).split(` `);b=a.shift();a.join(` `)+` `+b))

#313

@RokettoJanpu Okay, that works! Is there a way to always put the message into quotes and setting a - infront of the username? Then it would be perfect!

Thank you so much already!


#314

@nomnomfighter

This should do the trick. Change !addquote to:

$(urlfetch http://twitch.center...&data=$(eval a=decodeURIComponent(`$(querystring)`).split(` `);b=a.shift();`"`+a.join(` `).replace(/"/g,``)+`" - `+b))

#315

@RokettoJanpu THANK YOU SO MUCH! This is exactly what I wanted!


#316

Hi guys, I’m a moderator for a few channels and I wanted to utilize the quote system but as a clip system. With that said, when i add the clip it says something went wrong, we couldnt find the clip. Am i doing something wrong? the commands work, I can add, del and call. However it shows that message.
Capture


#317

Hey I am currently adding this to a channel I mod, I was wondering are you able to see the full list of quotes?


#318

@bighossross99

This is the link you can use to view the list in your browser:

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

Replace PUBLIC_TOKEN with your public token (8 characters long)

Otherwise you can view the list in a command response with this:

$(eval `$(urlfetch json http://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN)`.slice(0,400))

#319

Thank you kind person @RokettoJanpu


#320

$(urlfetch https://twitch.center/customapi/quote/list?token=80550788&no_id=1)


#321

use =importdata("…")


#322

Is there anyway to get this to work in youtube gaming live chat?


#323

Hi I am having the following issue:
Dirty1ou: !quote
Nightbot: Remote Server Returned Code 503

I have added approx. 15 or so quotes and wanted to test it out and am now getting this message 503. The 503 is being given for !quote and !quote list !delquote !addquote


#324

Having the same issue this morning as well. Perhaps just an error with the server?


#325

It is indeed on my end, looking into it.


#329

Hey,

after being able to make the command output result to my liking I found out the delete command does not actually clear them neither does the version with clear=1, the channel name is bloodyhs


#330

@aezhimself

Are you sure you set up the command response for your delete command correctly? It should look like this:

$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&clear=1)

PRIVATE_TOKEN is replaced with your private token, which should be some jumble of letters and numbers that is 16 characters long.


#331

Anyone else getting an error 500 when trying to add a new quote?