Latest Youtube video link
With this script you can embed the link to your latest Youtube video in a chat bot message, with or without the video title.
Enter your Youtube channel ID
Note: You can find your channel ID by going to your Youtube channel and looking at the URL bar in your browser. It's the code that comes after 'https://www.youtube.com/channel/' and is usually a random string of numbers and letters. If you have enough subscribers, it can also just be the name of the channel.
After submitting your channel ID, you'll get the correct URLs for the bot commands in the next step.
Bot commands
Next we need to setup bot commands for you or your mods to use in chat. You can use the same commands if you want to setup a timer.
Bot | Type | Code | Response in chat (link to video) |
---|---|---|---|
Nightbot | URL only | $(urlfetch https://api.solkku.com/youtube/?channel=CHANNEL_ID) |
https://youtu.be/xxxxxxxxx |
Nightbot | Title + URL | $(urlfetch https://api.solkku.com/youtube/?channel=CHANNEL_ID&title=True) |
This is the video title - https://youtu.be/xxxxxxxxx |
Streamlabs ChatBot | URL only | $readapi(https://api.solkku.com/youtube/?channel=CHANNEL_ID) |
https://youtu.be/xxxxxxxxx |
Streamlabs ChatBot | Title + URL | $readapi(https://api.solkku.com/youtube/?channel=CHANNEL_ID&title=True) |
This is the video title - https://youtu.be/xxxxxxxxx |
Streamlabs CloudBot | URL only | {readapi.https://api.solkku.com/youtube/?channel=CHANNEL_ID} |
https://youtu.be/xxxxxxxxx |
Streamlabs CloudBot | Title + URL | {readapi.https://api.solkku.com/youtube/?channel=CHANNEL_ID&title=True} |
This is the video title - https://youtu.be/xxxxxxxxx |
StreamElements Bot | URL only | ${customapi.https://api.solkku.com/youtube/?channel=CHANNEL_ID} |
https://youtu.be/xxxxxxxxx |
StreamElements Bot | Title + URL | ${customapi.https://api.solkku.com/youtube/?channel=CHANNEL_ID&title=True} |
This is the video title - https://youtu.be/xxxxxxxxx |
Personalize your bot message
Feel free to embed this code into your bot message to personalize it more. You can have text before and after it.
Here's a Nightbot command example:
Check out my Youtube channel and the latest video $(urlfetch https://api.solkku.com/youtube/?channel=CHANNEL_ID&title=True) - Leave a like and subscribe!