SO, there is a problem with channel points redemptions not working right away at the start of the stream. So does anyone know if there is a way to add a nightbot way to make a first command?
Thanks!
I'm a moderator in a stream and the streamer wants a way to make a command that works like a normal first redemption that you can redeem for 1 point.
so for example, if you type "!first" in chat and you are the first person to use the command that stream, you will claim a first redemption.
If you know anyway to do this please let me know!
Thanks!
Thank you for the explanation, I now understand.
First of all, I should clarify that Twitch doesn't offer an API endpoint for Channel Points, therefore Nightbot can't manage them in any way. I don't know if that's what you were after, clarifying just in case.
Now, what I can offer you is to add their names to a list, which can then be consulted, we can also have a congratulation message if an user is indeed the first one to use it, and a message that tells everyone who was first once they use the command later, would that work for you?
Rapid Orangutan said:
I do need to ask if the command resets every stream as if it did not it would be harder to use.
Yes, that was already planned, the whole thing will be automated, don't worry. 😉
We'll use the Quote API, get your tokens by following the Manual Installation link.
Refer to the following to identify your PUBLIC_TOKEN and PRIVATE_TOKEN:
$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=$(querystring))$(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=$(querystring))$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&data=$(querystring))
Copy them and store them somewhere safe, never share your PRIVATE_TOKEN, anyone could then manage your list, that's why the code I'll write won't contain command calls to add the new commands through the chat, add the new commands through the dashboard.
The command will be split in two parts, the second half being the alias of the first one:
!firstMessage:
js$(eval const l = '$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=-1&no_id=1)'.split(' | '); const s = '$(twitch $(channel) "{{uptimeAt}}")'; const u = '$(user)'; !l[0].includes(s) ? `PRIVATE_TOKEN&data=${encodeURI(s + ' | ' + u)}` : l[1].includes(u) ? `Yes ${u}, you were first today!` : `Sorry ${u}, you were not first today, ${l[1]} was!`;)
Alias: _first
_firstMessage:
js
js$(eval const q = decodeURI('$(query)'); const a = '$(urlfetch https://twitch.center/customapi/addquote?token=$(query))'; !q.includes('PRIVATE_TOKEN') ? q : a.includes('Successfully added') ? `Congratulations ${q.split(' | ')[1]}, you are first!` : 'There was an error, try again later';)
All you have to do now is to replace the PUBLIC_TOKEN (1) and PRIVATE_TOKEN (2) fields, and add the commands to your instance of Nightbot through the dashboard.
You have three options:
TOKENS (it doesn't matter if it's the streamer or not), and then send them the edited commands' code with an explanation of how to set it up;Didn't find your answer? The community is on Discord.
Ask on Discord