Create Q&A for Youtube

Hello all! Please excuse my ignorance but I am looking to create a custom command where Nightbot can create a question and answer list through a command that chat could enter ON YOUTUBE. (i.e !q&a “why is your hair blue?”)

I want it to add that question to a queue that I can display on my screen and go down the queue.

I have seen posts about how to do this for twitch but nothing for setting it up on youtube.

Any help would be amazing!

Thank you.

Hey @SirZebulon!

I think you could use the Quote System API for that.

@Emily is that API not for twitch only?

No, you can also use it on YouTube :wink:

1 Like

EDIT: I think I understand now actually! basically, their questions are added as quotes and I can view them via the list command. Would you happen to know how I could display the current question on my stream and cycle through them with some sort of !next command?

okay, i have it set up but how would I turn it into a question funnel? I am also struggling with the “!quote list” command (if you don’t mind helping me)

So now you have a set of various commands, you can rename them to your liking, for example:
!addquote!ask
!quote!question, and therefore !quote list becomes !question list
!delquote!delquestion
!editquote → I suggest deleting that one, you won’t need it.

You could also add another one to purge the list completely: copy the code in !delquote and add &clear=1 at the end of the URL, right before the closing parenthesis ), you could call that one !clearquestions for example.

Make sure !ask's userlevel is set to Everyone, and that !question, !delquestion, and !clearquestions's userlevels are set to at least Moderator.

And from there you should be set!

What don’t you understand about !quote list?

you have been an amazing help. I have only 2 more questions and I will leave you alone lol.

1.) Would you happen to know how I could display the current question on my stream and cycle through them?

2.) is there any way I could have it display the username of the question submitter?

1 Like

1⁣. The easiest solution I see would be to do !question list, open the link and capture that. :thinking: Now if you want to stylize them you’re gonna need to write some code to use the URL and add style onto it with CSS for example.

2⁣. Yes, you definitely can, take your !ask question, localize $(querystring) and depending on where you want the username to be (in front or at the end of the question), add the $(user) variable, between the two add %20%E2%80%94%20, that’s the URL-encoding of “⁣ — ⁣”, so for example: $(user)%20%E2%80%94%20$(querystring) for User — Question.

Btw, you can also create an alias for !question list, if you won’t use !question at all: create a !questions (with an s) command, in the Message field add “list”, and in the Alias field add !question (without s).
And of course feel free to call your commands whatever is simplest for you, for example you could shorten !questions to !q so you don’t have to type the whole thing every time, and you could rename !question to _question to specify it’s an aliased command you don’t intend to use otherwise.

Also, quick note, the link !question list gives you will always be the same, so you could as well bookmark it.

1 Like

you have been an AMAZING help. Thank you so much, I will see what I can do to finish this up myself.

Thank you so much @Emily

1 Like

You’re very welcome, have fun with it!

Oh, also, last note in case you want to be fancy, you can change the output of the commands by putting the $(urlfetch) inside an $(eval), like so for example:

$(eval a=`$(urlfetch ADDQUOTE_LINK)`; if(a.toLowerCase().includes(`successfully`)){`$(user) — Your question as been recorded.`}else{`$(user) — There was an error, try again.`})

You can remove the .toLowerCase() if you make sure you match the casing of the regular output in .includes(), so:

$(eval a=`$(urlfetch ADDQUOTE_LINK)`; a.includes(`Successfully`)?`$(user) — Your question as been recorded.`:`$(user) — There was an error, try again.`)

I just saw your edit, for a !next command you can use the $(count) variable in the Message field, and have !question as the alias of the command.
At some point the counter will be higher than the number of questions and it will then pick a question you already answered before.

To reset the $(count) variable without having to go edit the command in the dashboard, you can create a !resetnext command and put !next -c=0 in the Message field and !editcom as the alias of the command.

Make sure both of these commands’ userlevel are at least set to Moderator.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.