Introduction
Live Streaming is one of the most entertaining media on Earth. With more than 90,000 channels live daily, Twitch is the number one platform for Streamers.
Today, with Wayscript we are going to build a script to post on Twitter and Discord about current live Streams.
Prerequisites
No prerequisites for this post, but here is some documentation you might find useful.
- Working with Time Trigger
- Working with Twich
- Working with Loops
- Working with Discord
- Workign with Twitter
Trigger
For this tutorial, we’ll use Time Trigger and choose an appropriate time. Then, the script will automatically run at this precise time.
Add Time Trigger as a trigger.
Then set the script to run every dat at 8:00 pm.
Get Current Live Streams
Wayscript provides a Twitch module that you can use to get data about channels, users, or streams. Add the module as a new step.
Once it’s done, you’ll have to choose a model. For this post, we’ll get a list of the current top streams. This list will contain the top 10.
The next step is to choose the output we are going to work with.
Posting on Twitter and Discord
If you noticed, the output containing the current live streams is a list. It means that to properly post on Twitter and Discord, we have a loop through it and work with each item.
Add a loop as a new step.
As I said earlier, we must loop through the list.
Great. Once it’s done we can now add Discord and Twitter modules to the party.
If you have an account on Twitter, add it and set the mode to Post a Twitter status. The message will simply be List_Of_Top_Streamers_Item.
Once you’ve finished with it, we can configure the Discord module. You’ll also need to add an account and choose the channel into which you want to write the message.
Wayscript lets you provide a lot of useful inputs such as the name of the bot posting the message in the channel and an image URL.
Great! The script is now ready to run automatically, so be sure you have the Time Trigger switched on. :)
Conclusion
Questions about this script or anything else? Join our Discord. We're always around to help. If you want to work with the full script template, just find it here
Top comments (0)