-
-
Save dwongdev/950cb663d20981cb6425911f2e8fa69c to your computer and use it in GitHub Desktop.
Revisions
-
smiley revised this gist
Mar 9, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Go to https://ifttt.com/ and create an account (if you don't already have one) Webhooks are super-customizable and allow you to make pretty well-detailed visuals. However, their format is also somewhat complex to get right without extensive testing, so here's a template which would be useful to most people: ```json { "content": "{{ChannelName}} went live on Twitch", "embeds": [{ "title": "{{ChannelUrl}}", "url": "{{ChannelUrl}}", @@ -40,10 +40,10 @@ Webhooks are super-customizable and allow you to make pretty well-detailed visua "text": "{{CreatedAt}}" }, "image": { "url": "{{StreamPreview}}" }, "author": { "name": "{{ChannelName}} is now streaming" }, "fields": [ { -
smiley revised this gist
Mar 8, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -116,5 +116,5 @@ To this: **Note:** The image address you just used for your Twitch profile picture may stop working if you change your picture. I'm not sure how Twitch manages those. # Credits - This guide was adapted from this [YouTube to Discord via IFTTT guide](https://gist.github.com/Godimas/ae8e7c7cbd6236622c777d6bcb7a6748). - The Twitch webhook icon is courtesy of FIVEicons LLC and available under a CC-BY 2.5 license here: https://www.iconfinder.com/icons/318551/twitch_twitch.tv_icon -
smiley revised this gist
Dec 2, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -77,6 +77,7 @@ If you'd like to show your Twitch profile picture in the box: 2. Right-click your profile picture in the **top-right**:  3. Click "Copy image address" 4. Paste that address into this blob instead of `<IMAGE_URL>`: ```json -
smiley revised this gist
Dec 2, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -75,6 +75,7 @@ If you'd like to customize the message text -- "xqcow has gone live on Twitch!" If you'd like to show your Twitch profile picture in the box: 1. Go to Twitch 2. Right-click your profile picture in the **top-right**:  3. Click "Copy image address" 4. Paste that address into this blob instead of `<IMAGE_URL>`: -
smiley revised this gist
Dec 2, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,7 +61,7 @@ Webhooks are super-customizable and allow you to make pretty well-detailed visua } ``` This snippet produces this snippet: (for the channel "xQcow"):  ## Custom message If you'd like to customize the message text -- "xqcow has gone live on Twitch!" -- change the **content attribute:** @@ -75,7 +75,7 @@ If you'd like to customize the message text -- "xqcow has gone live on Twitch!" If you'd like to show your Twitch profile picture in the box: 1. Go to Twitch 2. Right-click your profile picture in the **top-right**:  3. Click "Copy image address" 4. Paste that address into this blob instead of `<IMAGE_URL>`: ```json -
smiley revised this gist
Dec 2, 2017 . 2 changed files with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed.LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
smiley created this gist
Dec 2, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,118 @@ # Making an automatic Twitch -> Discord notification (using IFTTT) So you went live and you want everyone to know. Here's how you do it: # Part 1 - Register on IFTTT Go to https://ifttt.com/ and create an account (if you don't already have one) # Part 2 - Make a Discord Webhook - Find the Discord channel in which you would like to send Tweets. - In the settings for that channel, find the Webhooks option and create a new webhook. **Note: This URL should be kept _private_. It allows anyone to write messages to that specific channel using that specific URL.** Keep it safe!  - Name the webhook however you like and feel free to change the generic profile picture. I chose [this icon](https://cdn1.iconfinder.com/data/icons/micon-social-pack/512/twitch-128.png) as it fits the circle nicely. - Copy the URL somewhere and keep it handy for the next step. # Part 3 - Create a new IFTTT applet/recipe 1. Go [here](https://ifttt.com/create) to create a new "Applet" 2. Click the big blue "[+] This" and choose "Twitch" (use the search bar to find it quickly) 3. Connect your account if necessary. 4. Choose "New stream started by you" (it should be the 2nd option from the left) 5. Click the big blue "[+] That" and choose "Webhooks" 6. Choose "Make a web request" (it should be the only option) 7. Fill in the following details: > **URL:** _[your URL from "part 2" above]_ > **Method:** POST > **Content type:** `application/json` > **Body:** _[see the snippet below]_ 8. Click "Create Action" 9. Done! # Snippet for "Body" Webhooks are super-customizable and allow you to make pretty well-detailed visuals. However, their format is also somewhat complex to get right without extensive testing, so here's a template which would be useful to most people: ```json { "content": "{{ChannelName}} has gone live on Twitch!", "embeds": [{ "title": "{{ChannelUrl}}", "url": "{{ChannelUrl}}", "color": 6570404, "footer": { "text": "{{CreatedAt}}" }, "image": { "url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_{{ChannelName}}-1280x720.jpg" }, "author": { "name": "{{ChannelName}} is now streaming!" }, "fields": [ { "name": "Playing", "value": "{{Game}}", "inline": true }, { "name": "Started at (streamer timezone)", "value": "{{CreatedAt}}", "inline": true } ] }] } ``` This snippet produces this snippet: (for the channel "xQcow"): <IMAGE> ## Custom message If you'd like to customize the message text -- "xqcow has gone live on Twitch!" -- change the **content attribute:** ```json { "content": "{{ChannelName}} has gone live on Twitch!", "embeds": [{ ``` ## Show your Twitch profile picture in the embed (advanced) If you'd like to show your Twitch profile picture in the box: 1. Go to Twitch 2. Right-click your profile picture in the **top-right**: <IMAGE> 3. Click "Copy image address" 4. Paste that address into this blob instead of `<IMAGE_URL>`: ```json "thumbnail": { "url": "<IMAGE_URL>" }, ``` 5. Paste **that** blob below the `image` area in the **main** blob, so that part would change from this: ```json "footer": { "text": "{{CreatedAt}}" }, "image": { "url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_{{ChannelName}}-1280x720.jpg" }, "author": { "name": "{{ChannelName}} is now streaming!" }, ``` To this: ```json "footer": { "text": "{{CreatedAt}}" }, "image": { "url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_{{ChannelName}}-1280x720.jpg" }, "thumbnail": { "url": "<IMAGE_URL>" }, "author": { "name": "{{ChannelName}} is now streaming!" }, ``` **Note:** The image address you just used for your Twitch profile picture may stop working if you change your picture. I'm not sure how Twitch manages those. # Credits - This guide was adapted from this [YouTube to Discord via IFTTT guide](). - The Twitch webhook icon is courtesy of FIVEicons LLC and available under a CC-BY 2.5 license here: https://www.iconfinder.com/icons/318551/twitch_twitch.tv_icon