Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update twitch.md #220

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions doc_posts/_triggers/twitch.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,36 @@ Message | Chat message to listen to. Must be an exact match. Can include **[Wild
| Display Name | Viewer's display name (can contain uppercase characters). |
| User ID | Viewer's user ID. |
| Message | Viewer's message. |
| Message ID | ID of the viewer's message |
| Emote List | Viewer's available emotes. <br/> Basic format: `FirstEmoteID:FirstIndex-LastIndex/ SecondEmoteID:FirstIndex-LastIndex` <br/> Message containing multiple emotes will be formatted such as: `FirstEmoteID:FirstIndex(1)-LastIndex(1),FirstIndex(2)-LastIndex(2),FirstIndex(3)-LastIndex(3)` <br/>{% include image_collapse_table.html name="chat_emotes" src="chat_emotes.png" alt="Chat Emotes List" btn="Emotes Example" %}|
| Badge List | Basic format: `FirstBadgeName/version,SecondBadgeName/version` <br/> For example: `broadcaster/1, subscriber/0` <br/> [Global Badges List](https://badges.twitch.tv/v1/badges/global/display), [Channel Badges List](https://badges.twitch.tv/v1/badges/channels/CHANNEL_ID/display) <br/> To find the badge ID in the JSON, look for BadgeList.badge_sets[`BADGENAME`].versions[`VERSION`].image_url_1x. The last part 1x can be changed to 2x, 3x or 4x for bigger size. |
| Channel | Channel Name where the message originated from. Will return `w` if it's a whisper. |
| Name Color | Chat name color in hexadecimal format. |
| Bits | The amount of bits cheered. (<strong>Does not include PowerUps</strong>)|
| Custom Reward ID | ID of the Reward that was redeemed. |

| Reply Parent User Login | User login of the sender of the parent message. |
| Reply Parent Display Name | User name of the sender of the parent message. |
| Reply Parent User ID | User ID of the sender of the parent message. |
| Reply Parent Message Body | The message body of the parent message. |
| Reply Parent Message Id | An ID that uniquely identifies the parent message that this message is replying to. |
| Reply Thread Parent Message ID | An ID that identifies the parent message of the reply thread. |
| Reply Thread Parent User Login | User ID of the sender of the thread’s parent message. |

| Room ID | An ID that identifies the chat room (channel). |
| Source ID | A UUID that identifies the source message from the channel the message was sent from. |
| Source Room ID | An ID that identifies the chat room (channel) the message was sent from. |
| Source Badges | Comma-seperated list of chat badges for the chatter in the room the message was sent from. This uses the same format as the <code>badges</code> list. |
| Source Badge Info | Contains metadata related to the chat badges in the source-badges tag. |

| Is Broadcaster | Whether the chatter is the broadcaster. 0 = not broadcaster, 1 = broadcaster |
| Is Mod | Whether the chatter is a mod. 0 = not mod, 1 = mod |
| Is VIP | Whether the chatter is a vip. 0 = not vip, 1 = vip |
| Is Founder | Whether the chatter is a Founder. 0 = not founder, 1 = founder |
| Is Subscriber | Whether the chatter is a subscriber. 0 = not subscriber, 1 = subscriber |
| Is Turbo | Whether the chatter is a turbo user. 0 = no turbo, 1 = has turbo |
| First Time | Whether it's user's first chat message. 0 = not first, 1 = first |
| Unix Timestamp | The timestamp when the message was sent, in Unix format. |
| From Channel ID | Which channel the trigger came from. |
{:class='table table-secondary table-hover' }

Expand Down Expand Up @@ -326,3 +351,30 @@ Triggers when the /shoutout command is used. The channel must be live and stream
|Recent Categories|Recent categories streamed by the person being shouted out.
|From Channel ID|Channel ID of the channel making the shoutout.
{:class='table table-secondary table-hover' }

<hr>

##### Twitch Automatic Reward Redemption
Triggers when any automatic reward is redeemed, for example "Gigantify an Emote" or "Unlock a Random Sub Emote".

{% include alert.html text="Cost <strong>does not</strong> show Bit cost. It only shows the amount of channel points something cost." type="warning" %}
{% include alert.html text="If user redeems <code>Gigantify Emote</code> the emote the user Gigantified will be the last index in the array." type="info" %}

| Pull Data Value | Explanation |
|-------|--------|
|User Name|Viewers username.
|Display Name|Viewer's display name.
|User ID|Viewer's user ID.
|Cost|Reward cost.
|Message|Viewer's message if required.
|Emotes|Array of objects with the Emote IDs within the message.
|Type|Redemption Type. Returns <code>message_effect</code>, <code>gigantify_an_emote</code>, <code>celebration</code>, <code>send_highlighted_message</code>, <code>random_sub_emote_unlock</code>, <code>single_message_bypass_sub_mode</code>, <code>chosen_sub_emote_unlock</code> or <code>chosen_modified_sub_emote_unlock</code>
|Unlocked Emote|Returns an Object with the ID and Name of the unlocked emote
|Redeemed At|The time in twitch format, that the item was redeemed
|Reward ID|Reward's general ID.
|Redeem ID|Redeem's specific ID.
|Channel ID|Which channel the trigger came from.
|From Channel ID|Which channel the trigger came from.
{:class='table table-secondary table-hover' }