Description
This extension will run once per minute using the Present Viewers trigger to check for any new clips created within the scan interval. If any new clips are found, then a custom New Twitch Clip Found
event will be triggered. Also included: a !clip
command to create a clip via Chat and post to Chat/Discord, using this command will avoid the New Twitch Clip Found event from being triggered multiple times.
Import Code
autoTwitchClipScanner_v0.2.3-3.sb (18.0 KB)
Installation
- Download the import code file
- Click the Import button to open the Import dialog
- Drag and drop the
autoTwitchClipScanner_v0.2.3-3.sb
file into the Import String box and then click Import
Configuration
Posting clips only if title is unique
- Set
postUniqueTitlesOnly
toTrue
if you only want to post clips that have a title that is different from the channel title
The two settings below use the following syntax for time spans:
Postfix Symbol | Usage | Explanation |
---|---|---|
d |
4d | 4 days |
h |
4d3h | 4 days, 3 hours |
m |
4d3h2m | 4 days, 3 hours, 2 minutes |
s |
4d3h2m1s | 4 days, 3 hours, 2 minutes, 1 second |
Scan Clips Interval
- The
scanClipsWithinLast
argument is the time span of how far back you want to scan clips for- This is set by default to
30d
, or 30 days - If you have a lot of clips, you may want to shorten the scan time span interval
- This is set by default to
Post Clips Interval
- The
postClipsWithinLast
argument is the time span of which clips you want to post if found- This is set by default to
8h
, or 8 hours, meaning any clips found within this time span will trigger theNew Twitch Clip Found
event - Make sure this time span is shorter than the Scan Clips Interval
- This is set by default to
New Twitch Clip Found
This is an example action that uses the New Twitch Clip Found Custom Trigger. It will be triggered if new Twitch clips are found. The trigger will populate the following variables:
Variable List
Variable Name | Explanation |
---|---|
%clipId% |
An ID that uniquely identifies the clip. |
%clipUrl% |
A URL to the clip. |
%clipEmbedUrl% |
A URL that you can use in an iframe to embed the clip |
%clipCreatorId% |
An ID that identifies the user that created the clip. |
%clipCreatorUserName% |
The user’s display name. |
%clipVideoId% |
An ID that identifies the video that the clip came from. This field contains an empty string if the video is not available. |
%clipGameId% |
The ID of the game that was being played when the clip was created. |
%clipGameTitle% |
Title of the clip category |
%clipGameArtUrl% |
A URL to a thumbnail for the clip category |
%clipLanguage% |
The ISO 639-1 two-letter language code that the broadcaster broadcasts in. For example, en for English. The value is other if the broadcaster uses a language that Twitch doesn’t support. |
%clipTitle% |
The title of the clip. |
%clipCreatedAt% |
The date and time of when the clip was created. The date and time is in RFC3339 format. |
%clipThumbnailUrl% |
A URL to a thumbnail image of the clip. |
%clipDuration% |
The length of the clip, in seconds. |
%clipIsFeatured% |
A Boolean value that indicates if the clip is featured or not. |
- By default, a Twitch Chat Message subaction will read:
%clipCreatorUserName% created a clip with title '%clipTitle%': %clipUrl%
- You may also use something like a Discord Basic Webhook subaction to post the clip in a #twitch-clips channel on your community Discord server