Events
Every follow, sub, tip and raid becomes one Fishrift event, whatever platform it came from. Custom widgets receive these objects.
#The event object
| Field | Type | Notes |
|---|
id | string | Unique per event. Stays the same when a platform sends it again |
platform | string | twitch, kick, youtube, kofi or external |
type | string | See the tables below |
viewer_name | string | Login or handle. Empty for channel events like stream_online. On YouTube this is the channel ID |
viewer_display_name | string | Display name |
amount | number | Depends on the type, see Amounts |
message | string | The viewer's message or the reward input |
months | number | Total months for resubs |
tier | string | 1000, 2000 or 3000 on Twitch. On YouTube the membership level name |
reward_title | string | Channel point reward name |
reward_id | string | Channel point reward ID |
reward_cost | number | Channel point reward cost |
is_anonymous | boolean | Anonymous gift subs and cheers |
is_test | boolean | Test events |
alert_id | string | Set when an Alert Box alert matched |
raw | object | The platform's original data |
timestamp | number | Milliseconds since 1970, when Fishrift received it |
Example:
{
"id": "tw_3f1c0b9a",
"platform": "twitch",
"type": "resub",
"viewer_name": "fishfan",
"viewer_display_name": "FishFan",
"tier": "1000",
"months": 14,
"message": "Still here!",
"raw": {},
"timestamp": 1759600000000
}
#Twitch
| Type | Fields |
|---|
follow | Viewer |
subscribe | tier. Gifted subs also arrive per recipient with raw.is_gift: true |
resub | tier, months, message |
gift_sub | tier, amount (number of subs), is_anonymous |
bits | amount (bits), message, is_anonymous |
raid | amount (viewers). The viewer is the raiding channel |
channel_points | reward_title, reward_id, reward_cost, message (input) |
hype_train_begin / hype_train_progress | amount (level) |
hype_train_end | |
poll_begin / poll_progress / poll_end | Details in raw |
prediction_begin / prediction_end | Details in raw |
charity_donation | amount in cents |
goal_begin / goal_progress / goal_end | Details in raw |
shoutout | The channel that was shouted out |
ad_break | amount (seconds) |
stream_online / stream_offline | |
#Kick
| Type | Fields |
|---|
follow | Viewer |
subscribe | months. Renewals also arrive as subscribe |
gift_sub | amount (number of subs) |
stream_online / stream_offline | |
#YouTube
| Type | Fields |
|---|
subscribe | A new member. tier is the level name |
resub | A member milestone, with months and message |
gift_sub | Gifted memberships, amount is the count |
superchat | Super Chats and Super Stickers. amount in micros, message |
#Ko-fi
| Type | Fields |
|---|
kofi_donation | amount, message |
kofi_subscription | amount, message |
kofi_commission | amount |
kofi_shop_order | amount |
#External donations
| Type | Fields |
|---|
external_donation | amount, message, raw.source_name, raw.currency |
See External donations.
#Amounts
| Type | amount is |
|---|
bits | Bits |
gift_sub | Number of subs |
raid | Viewers |
hype_train_begin, hype_train_progress | Level |
ad_break | Seconds |
kofi_*, external_donation | Money in whole units, so 5.00 is 5 |
superchat | Money in micros: divide by 1,000,000 |
charity_donation | Money in cents: divide by 100 |