-
Notifications
You must be signed in to change notification settings - Fork 0
Provider Twitch
Source: com.jopre.streamlink.provider.variables.TwitchVariableMap
See Provider Variable Mapping for the general, provider-based
concept this page is an instance of (ProviderVariable, ProviderName, etc).
Every EventConfigType below is a Twitch EventSub-backed event — see
Event Configs for the full deserialization details of each class.
| Event Config Class |
event JSON Value |
EventConfigType |
|---|---|---|
ChannelPointRedeemConfig |
channel_point_claim |
CHANNEL_POINT_CLAIM |
ChannelFollowEventConfig |
channel_follow |
CHANNEL_FOLLOW |
ChannelRaidEventConfig |
channel_raid |
CHANNEL_RAID |
ChannelSubscribeEventConfig |
channel_subscription |
CHANNEL_SUBSCRIBE |
ChannelChatConfig |
channel_chat |
CHANNEL_CHAT |
ChannelBitsConfig |
channel_bits |
CHANNEL_BITS |
ChannelHypeTrainBeginConfig |
hype_train_start |
CHANNEL_HYPE_START |
ChannelHypeTrainProgressConfig |
hype_train_progress |
CHANNEL_HYPE_PROGRESS |
ChannelHypeTrainEndConfig |
hype_train_end |
CHANNEL_HYPE_END |
ChannelGiftSubConfig |
channel_subscription_gift |
CHANNEL_SUBSCRIPTION_GIFT |
twitchVariableMap (a Map<EventConfigType, List<ProviderVariable>>) assembles the final
variable list for each event above by concatenating the shared lists below (METADATA_LIST +
SUBSCRIPTION_LIST + BASE_EVENT_LIST) with that event's specific list.
These variables are included for every event listed above.
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
metadata.message_id |
metadata.message-id |
STRING |
metadata.subscription_type |
metadata.subscription-type |
STRING |
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
subscription.type |
subscription.type |
STRING |
subscription.transport.session_id |
subscription.session-id |
STRING |
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
metadata.message_id |
event.event-id |
STRING |
event.broadcaster_user_id |
event.broadcast-user-id |
STRING |
event.broadcaster_user_name |
event.broadcast-user-name (StreamLinkConstants.BROADCASTER_VARIABLE_NAME) |
STRING |
event.user_login |
event.user-login |
STRING |
event.user_name |
event.user-name |
STRING |
Each section below lists the event-specific variables from TwitchVariableMap. The full
variable set delivered to a handler for that event is the shared lists above plus the
table shown here.
List: CHANNEL_POINT_CLAIM_LIST
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.reward.id |
pointredeem.reward-id |
STRING |
event.reward.title |
pointredeem.reward-title |
STRING |
event.reward.cost |
pointredeem.message-type |
STRING |
List: CHANNEL_FOLLOW_LIST
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.reward.id |
pointredeem.reward-id |
STRING |
List: CHANNEL_RAID_LIST
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.from_broadcaster_user_id |
event.user-id |
STRING |
event.from_broadcaster_user_name |
event.user-name |
STRING |
event.from_broadcaster_user_id |
raid.from-user-id |
STRING |
event.from_broadcaster_user_name |
raid.from-user-name |
STRING |
event.from_broadcaster_user_id |
raid.to-user-id |
STRING |
event.from_broadcaster_user_name |
raid.to-user-name |
STRING |
event.viewers |
raid.viewers |
STRING |
List: CHANNEL_SUBSCRIBE_LIST
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.duration_months |
subscribe.duration-months |
STRING |
event.streak_months |
subscribe.streak_months |
STRING |
event.user_login |
subscribe.user-login |
STRING |
event.user_name |
subscribe.user_name |
STRING |
event.tier |
subscribe.tier |
STRING |
List: CHANNEL_CHAT_LIST
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.chatter_user_id |
event.user-id |
STRING |
event.chatter_user_name |
event.user-name |
STRING |
event.message_id |
event.message-id |
STRING |
event.message.text |
event.message |
STRING |
List: CHANNEL_BITS_LIST
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.is_anonymous |
event.is-anonymous |
STRING |
event.message |
event.message |
STRING |
event.bits |
event.bits |
INTEGER |
List: CHANNEL_HYPE_TRAIN_START
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.level |
event.hype-train-level |
STRING |
event.total |
event.hype-train-total |
STRING |
event.progress |
event.hype-train-progress |
STRING |
event.goal |
event.hype-train-goal |
STRING |
event.is_golden_kappa_train |
event.hype-train-kappa |
STRING |
event.started_at |
event.hype-train-started-at |
STRING |
event.expires_at |
event.hype-train-expires-at |
STRING |
List: CHANNEL_HYPE_TRAIN_PROGRESS
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.level |
event.hype-train-level |
STRING |
event.total |
event.hype-train-total |
STRING |
event.progress |
event.hype-train-progress |
STRING |
event.goal |
event.hype-train-goal |
STRING |
event.is_golden_kappa_train |
event.hype-train-kappa |
STRING |
event.started_at |
event.hype-train-started-at |
STRING |
event.expires_at |
event.hype-train-expires-at |
STRING |
List: CHANNEL_HYPE_TRAIN_END
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.level |
event.hype-train-level |
STRING |
event.total |
event.hype-train-total |
STRING |
event.progress |
event.hype-train-progress |
STRING |
event.goal |
event.hype-train-goal |
STRING |
event.is_golden_kappa_train |
event.hype-train-kappa |
STRING |
event.started_at |
event.hype-train-started-at |
STRING |
event.cooldown_ends_at |
event.hype-train-cooldown-ends-at |
STRING |
List: CHANNEL_SUBSCRIPTION_GIFT
| Twitch Variable | StreamLink Variable | Data Type |
|---|---|---|
event.total |
event.total-subscriptions-gifted |
STRING |
event.tier |
event.subscription-tier |
STRING |
event.cumulative_total |
event.cumulative-total-subscriptions |
STRING |
event.is_anonymous |
is_anonymous |
STRING |
Event (EventConfigType) |
Config Key | Shared Lists | Event-Specific List |
|---|---|---|---|
| CHANNEL_POINT_CLAIM | channel_point_claim |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_POINT_CLAIM_LIST |
| CHANNEL_FOLLOW | channel_follow |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_FOLLOW_LIST |
| CHANNEL_RAID | channel_raid |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_RAID_LIST |
| CHANNEL_SUBSCRIBE | channel_subscription |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_SUBSCRIBE_LIST |
| CHANNEL_CHAT | channel_chat |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_CHAT_LIST |
| CHANNEL_BITS | channel_bits |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_BITS_LIST |
| CHANNEL_HYPE_START | hype_train_start |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_HYPE_TRAIN_START |
| CHANNEL_HYPE_PROGRESS | hype_train_progress |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_HYPE_TRAIN_PROGRESS |
| CHANNEL_HYPE_END | hype_train_end |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_HYPE_TRAIN_END |
| CHANNEL_SUBSCRIPTION_GIFT | channel_subscription_gift |
METADATA, SUBSCRIPTION, BASE_EVENT | CHANNEL_SUBSCRIPTION_GIFT |
These are called out as-is from the current source, in case they are unintentional and worth a follow-up fix rather than being treated as authoritative behavior:
-
CHANNEL_POINT_CLAIM_LIST:event.reward.costis mapped to the StreamLink variablepointredeem.message-type, which reads like a copy/paste naming mismatch (a "cost" value landing in a "message-type" variable). -
CHANNEL_FOLLOW_LIST: bindsevent.reward.idtopointredeem.reward-id, but Twitch'schannel.followEventSub payload has norewardobject — this looks like a leftover copy fromCHANNEL_POINT_CLAIM_LIST. -
CHANNEL_RAID_LIST: every entry reads fromevent.from_broadcaster_user_id/event.from_broadcaster_user_name(the raiding channel), including the fields written toraid.to-user-id/raid.to-user-name, so those two variables end up holding the raider's identity rather than the raided channel's.