Available Events
adbreak_begin
Ad-break has begun and ads are playing now in mentioned channel.
Fields:
channel
string - The channel the event occurred induration
int64 - Duration of the ads in secondsis_automatic
bool - Were the ads started by the ad-manager?started_at
time.Time - When did the ad-break start
ban
Moderator action caused a user to be banned from chat.
Note: This event does not contain the acting user! You cannot use the {{.user}}
variable.
Fields:
channel
string - The channel the event occurred intarget_id
string - The ID of the user being bannedtarget_name
string - The login-name of the user being banned
bits
User spent bits in the channel. The full message is available like in a normal chat message, additionally the {{ .bits }}
field is added with the total amount of bits spent.
Fields:
bits
int64 - Total amount of bits spent in the messagechannel
string - The channel the event occurred inusername
string - The login-name of the user who spent the bits
category_update
The current category for the channel was changed. (This event has some delay to the real category change!)
Fields:
category
string - The name of the new game / categorychannel
string - The channel the event occurred in
channelpoint_redeem
A custom channel-point reward was redeemed in the given channel. (Only available when EventSub support is available and streamer granted required permissions!)
Fields:
channel
string - The channel the event occurred inreward_cost
int64 - Number of points the user paid for the rewardreward_id
string - ID of the reward the user redeemedreward_title
string - Title of the reward the user redeemedstatus
string - Status of the reward (one ofunknown
,unfulfilled
,fulfilled
, andcanceled
)user_id
string - The ID of the user who redeemed the rewarduser_input
string - The text the user entered into the input for the rewarduser
string - The login-name of the user who redeemed the reward
clearchat
Moderator action caused chat to be cleared.
Note: This event does not contain the acting user! You cannot use the {{.user}}
variable.
Fields:
channel
string - The channel the event occurred in
delete
Moderator action caused a chat message to be deleted.
Note: This event does not contain the acting user! You cannot use the {{.user}}
variable.
Fields:
channel
string - The channel the event occurred inmessage_id
string - The UUID of the message being deletedtarget_name
string - Login name of the author of the deleted message
follow
User followed the channel. This event is not de-duplicated and therefore might be used to spam! (Only available when EventSub support is available!)
Fields:
channel
string - The channel the event occurred infollowed_at
time.Time - Time object of the follow dateuser_id
string - ID of the newly following useruser
string - The login-name of the user who followed
giftpaidupgrade
User upgraded their gifted subscription into a paid one. This event does not contain any details about the tier of the paid subscription.
Fields:
channel
string - The channel the event occurred ingifter
string - The login-name of the user who gifted the subscriptionusername
string - The login-name of the user who upgraded their subscription
hypetrain_begin
, hypetrain_end
, hypetrain_progress
An Hype-Train has begun, ended or progressed in the given channel.
Fields:
channel
string - The channel the event occurred inlevel
int64 - The current level of the Hype-TrainlevelProgress
float64 - Percentage of reached “points” in the current level to complete the level (not available onhypetrain_end
)event
EventSubEventHypetrain - Raw Hype-Train event, see schema inpkg/twitch/eventsub.go#L92
join
User joined the channel-chat. This is NOT an indicator they are viewing, the event is NOT reliably sent when the user really joined the chat. The event will be sent with some delay after they join the chat and is sometimes repeated multiple times during their stay. So DO NOT use this to greet users!
Fields:
channel
string - The channel the event occurred inuser
string - The login-name of the user who joined
kofi_donation
A Ko-fi donation was received through the API-Webhook.
Fields:
channel
string - The channel the event occurred forfrom
string - The name submitted by Ko-fi (can be arbitrarily entered)amount
float64 - The amount donated as submitted by Ko-fi (i.e. 27.95)currency
string - The currency of the amount (i.e. USD)isSubscription
bool - true on monthly subscriptions, false on single-donationsisFirstSubPayment
bool - true on first montly payment, false otherwisemessage
string - The message entered by the donator (not present when donation was marked as private!)tier
string - The tier the subscriber subscribed to (seems not to be filled on the first transaction?)
outbound_raid
The channel has raided another channel. (The event is issued in the moment the raid is executed, not when the raid timer starts!)
Fields:
channel
string - The channel the raid originated atto
string - The login-name of the channel the viewers are sent toto_id
string - The ID of the channel the viewers are sent toviewers
int64 - The number of viewers included in the raid
part
User left the channel-chat. This is NOT an indicator they are no longer viewing, the event is NOT reliably sent when the user really leaves the chat. The event will be sent with some delay after they leave the chat and is sometimes repeated multiple times during their stay. So this does NOT mean they do no longer read the chat!
Fields:
channel
string - The channel the event occurred inuser
string - The login-name of the user who left
permit
User received a permit, which means they are no longer affected by rules which are disabled on permit.
Fields:
channel
string - The channel the event occurred inuser
string - The login-name of the user who gave the permitto
string - The username who got the permit
poll_begin
/ poll_end
/ poll_progress
A poll was started / was ended / had changes in the given channel.
Fields:
channel
string - The channel the event occurred inpoll
EventSubEventPoll - The poll object describing the poll, see schema inpkg/twitch/eventsub.go#L92
status
string - The status of the poll (one ofcompleted
,terminated
orarchived
) - only available inpoll_end
title
string - The title of the poll the event was generated for
raid
The channel was raided by another user.
Fields:
channel
string - The channel the event occurred inusername
string - The login-name of the user who raided the channelviewercount
int64 - The amount of users who have been raided (this number is not fully accurate)
resub
The user shared their resubscription. (This event is triggered manually by the user using the “Share my Resub” button and does not occur when the user does not actively share their sub!)
Fields:
channel
string - The channel the event occurred inplan
string - The sub-plan they are using (1000
= T1,2000
= T2,3000
= T3,Prime
)subscribed_months
int64 - How long have they been subscribedusername
string - The login-name of the user who resubscribed
shoutout_created
The channel gave another streamer a (Twitch native) shoutout
Fields:
channel
string - The channel the event occurred into_id
string - The ID of the channel who received the shoutoutto
string - The login-name of the channel who received the shoutoutviewers
int64 - The amount of viewers the shoutout was shown to
shoutout_received
The channel received a (Twitch native) shoutout by another channel.
Fields:
channel
string - The channel the event occurred infrom_id
string - The ID of the channel who issued the shoutoutfrom
string - The login-name of the channel who issued the shoutoutviewers
int64 - The amount of viewers the shoutout was shown to
stream_offline
The channels stream went offline. (This event has some delay to the real category change!)
Fields:
channel
string - The channel the event occurred in
stream_online
The channels stream went offline. (This event has some delay to the real category change!)
Fields:
channel
string - The channel the event occurred in
sub
The user newly subscribed on their own. (This event is triggered automatically and does not need to be shared actively!)
Fields:
channel
string - The channel the event occurred inplan
string - The sub-plan they are using (1000
= T1,2000
= T2,3000
= T3,Prime
)username
string - The login-name of the user who subscribed
subgift
The user gifted the subscription to a specific user. (This event DOES occur multiple times after submysterygift
events!)
Fields:
channel
string - The channel the event occurred ingifted_months
int64 - Number of months the user giftedorigin_id
string - ID unique to the gift-event (can be used to matchsubgift
events to correspondingsubmysterygift
event)plan
string - The sub-plan they are using (1000
= T1,2000
= T2,3000
= T3,Prime
)subscribed_months
int64 - How long the recipient has been subscribedto
string - The user who received the subtotal_gifted
int64 - How many subs has the user given in total (might be zero due to users preferences)username
string - The login-name of the user who gifted the subscription
submysterygift
The user gifted multiple subs to the community. (This event is followed by number x subgift
events.)
Fields:
channel
string - The channel the event occurred innumber
int64 - The amount of gifted subsorigin_id
string - ID unique to the gift-event (can be used to matchsubgift
events to correspondingsubmysterygift
event)plan
string - The sub-plan they are using (1000
= T1,2000
= T2,3000
= T3,Prime
)username
string - The login-name of the user who gifted the subscription
sus_user_message
A suspicious (monitored / restricted) user sent a message in the given channel
ban_evasion
string - Status of the ban-evasion detection:unknown
,possible
,likely
channel
string - The channel in which the event occurredmessage
string - The message the user sent in plain textshared_ban_channels
[]string - IDs of channels with shared ban-info in which the user is also bannedstatus
string - Restriction status:active_monitoring
,restricted
user_id
string - ID of the user sending the messageuser_type
[]string - How the user ended being on the naughty-list:manually_added
,ban_evader_detector
, orshared_channel_ban
username
string - The login-name of the user sending the message
sus_user_update
The status of suspicious user was changed by a moderator
channel
string - The channel in which the event occurredmoderator
string - The login-name of the moderator changing the statusstatus
string - Restriction status:no_treatment
,active_monitoring
,restricted
user_id
string - ID of the suspicious userusername
string - Login-name of the suspicious user
timeout
Moderator action caused a user to be timed out from chat.
Note: This event does not contain the acting user! You cannot use the {{.user}}
variable.
Fields:
channel
string - The channel the event occurred induration
time.Duration - The timeout duration (nanoseconds)seconds
int - The timeout duration (seconds)target_id
string - The ID of the user being timed outtarget_name
string - The login-name of the user being timed out
title_update
The current title for the channel was changed. (This event has some delay to the real category change!)
Fields:
channel
string - The channel the event occurred intitle
string - The title of the stream
whisper
The bot received a whisper message. (You can use (.*)
as message match and {{ group 1 }}
as template to get the content of the whisper.)
Fields:
username
string - The login-name of the user who sent the message