Hey @Brett_Wolfe and @Urban_Wildlife-UK (similar post)!
One way you could do this is by using the quote system API. You’ll get your TOKENS
by clicking on the second link in the post, use these in the commands I wrote. To know where to look for your PUBLIC_TOKEN
and PRIVATE_TOKEN
, look at the field bellow:
$(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))
Keep your PRIVATE_TOKEN
secret, don’t share it anywhere. To add a command containing your PRIVATE_TOKEN
do it from the dashboard. Don’t use the chat as anyone could monitor it and copy the token, they could then edit your data.
Then you’ll need a set of commands:
-
!addspot
— to add a timestamp:$(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=$(user) $(querystring) $(twitch $(channel) "{{uptimeLength}}"))
The stored data will look as follow:
USERNAME SPOTTING TIMESTAMP
Feel free to personalize it. -
!spot
— to consult the timestamps list:https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN
or if you prefer having a random one, where you can also enter a query to search for a specific timestamp:
$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=$(querystring))
-
!clearspot
— to clear the entire timestamps list:
make sure to set the userlevel of this command to
Moderator
.$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&clear=1)
-
!delspot
— to remove a specific timestamp, call the command with the ID of the timestamp:
make sure to set the userlevel of this command to
Moderator
.$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&data=$(querystring))
Don’t forget to replace
PUBLIC_TOKEN
and PRIVATE_TOKEN
in the commands I wrote above.
These are the only things you need to replace, for example many people replace $(channel)
with $(THEIR_CHANNEL_NAME)
and it causes issues: $(channel)
is its own variable that does the job for you, if you wanted to replace it, you’d need to use YOUR_CHANNEL_NAME
, not $(YOUR_CHANNEL_NAME)
.
Sure this doesn’t create a CSV file, but you can make it so by personalizing !addspot
by replacing the spaces by commas, you’d then need to copy/paste the content on your computer and save the file.
To get the file without the quote ID, you can use the following link:
https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&no_id=1