Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(eval
- const regex = /([0-9]+):([0-9]+):([0-9]+)/g;
- const time = "$(query)".match(regex);
- if (time === null) {
- "Please enter a valid time in the format HH:MM:SS";
- } else {
- const seconds = (+time[0].split(':')[0]) * 60 * 60 + (+time[0].split(':')[1]) * 60 + (+time[0].split(':')[2]);
- `$(urlfetch https://api.twitch.tv/helix/clips?broadcaster_id=$(channel)&has_delay=true&duration=${seconds}&started_at=${encodeURIComponent(moment.utc().subtract(seconds, 'seconds').format('YYYY-MM-DDTHH:mm:ss')+'Z')}&access_token=YOUR_ACCESS_TOKEN)`;
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement