Command that writes to a TXT file

So I’m wanting to make a command that marks a spot for highlights later on Twitch and write the timestamp to a TXT file. Is that possible with Nightbot?

@super_shadows Creating a list of highlights is possible with ehsankia’s quote custom API - read more about it here.

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 and keep them somewhere safe!

We can use this custom API to add to and view a list of timestamps. I’ve set up two commands below: !addhighlight which adds an entry to the list containing the stream timestamp and !highlights which gives a link that lets you view the list. I assume you’ll want !addhighlight to be mod-only so I’ve set the userlevel parameter as such (-ul=moderator), though you can simply undo it by deleting that part. Either copy and paste these commands into chat or add them through the Nightbot dashboard. Add the commands through chat only if you are sure no one else is there, otherwise they might see your private token (which is used to edit the list)! Replace PUBLIC_TOKEN with your public token and PRIVATE_TOKEN with your private token.

!addcom -ul=moderator !addhighlight $(urlfetch http://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=$(twitch $(channel) "{{uptimeLength}}")$(eval a=decodeURIComponent(`$(querystring)`);a==``?` `:` - `+a)) to $(channel)'s highlights list!

!addcom -cd=5 !highlights $(channel)'s highlights list: http://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&no_id=1

Usages:

For AddHighlight:
!addhighlight [optional note to attach to the timestamp, otherwise you can leave this blank]

For Highlights:
!highlights

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