How can I create the custom command for send Steam keys in the chat every n minutes? I have a hundred keys, I would like to distribute them on the stream automatically to the chat using the nightbot and that one key would not be repeated twice.
This is possible with a timer and ehsan’s quote list API.
Click this link. It will generate three links and two tokens, a public token (8 characters long) and a private token (16 characters long). The public token is located within the first generated link. The private token is located within both the second and third generated links. The tokens are found after
token= and before
&data=$(querystring) Copy them down and keep them somewhere safe!
Open a browser tab. Copy and paste this link into the search box:
PRIVATE_TOKEN with your private token and
STEAM_KEY with one of your Steam keys. Run this link 100 times, once for each Steam key.
Copy and paste this command into chat or add it through the Nightbot dashboard. Normally I wouldn’t warn against adding the command through chat since you’d only be exposing your public key to chat (which only shows the list being used in the command, not edits it) but since the list contains sensitive information (your Steam keys), I highly advise you add it through the dashboard or add it through chat only if you are sure no one else is in chat with you.
!addcom -ul=owner !key $(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=$(count))
PUBLIC_TOKEN with your public token.
Go to https://beta.nightbot.tv/timers to create a timer:
1: Click “+Add”
2: Give the timer any name you like.
3: Type $(query) in the Message field.
4: Set the time interval to whatever you want (the timer will trigger the command every N minutes).
5: Set the chat lines requirement appropriately (how many lines of chat must pass before the timer triggers, set this to 2 lines if you are unsure of this).
6: Type !key in the Alias field.
7: Click “Submit”
Even if you wait out the set time interval, the chat lines requirement must be fulfilled (minimum 2 lines) in order for Nightbot to send keys to chat. To ensure this, just send 2 quick messages to chat.
Thank you so much! And what about YouTube? I needed it for youtube. I’m sorry I didn’t say before
It should still work for YouTube I believe.
You’re right! It works! Once again, many thanks!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.