Introduction
If you are running a messaging channel, you might want the members to not miss any post on your social media.
Using Wayscript, you can integrate Twitter with Discord and share regularly your tweets seamlessly.
Let’s build this script.
Prerequisites
There are no prerequisites for this script. However, here are some documentation you might find useful.
Trigger
We want to post the Tweets regularly in the Discord channel. Let’s choose time so all tweets within 24 hours will be posted automatically in the channels.
Add it as a Trigger.
You have a lot of options when configuring the Time Trigger. For this post, the script will run every day. Once you’ve chosen this mode, you will have to set the time. Choose the most suitable time for you.
Retrieve Tweets
Wayscript provides a Twitter module with a lot of functionalities for your needs.
Add it as a new step.
Now, add your account and choose My Profile Timeline for the mode. This mode pulls data from your timeline.
Once it’s done, you’ll have to choose the outputs. The Tweets outputs will work best here.
Loop through Tweets and Post on Discord
The output (Tweets) we are working with is actually a list of tweets. To better work with it, we’ll use a loop, get each item (Tweets_item) according to the index and post it on Discord.
Fortunately, Wayscript provides many options for loops but here we will use the Loop module.
Add as a new step.
This module needs an input (a list) to work. Add the Tweets variable.
Now, each Tweets_Item contains information we need for a tweet such as content and link. This will be used in the Discord module.
Add it as a new step in the Loop.
The configuration for the Discord module is simple. We want here to only write a message on the channel. Then you can choose the channel, the bot name and write your message.
Now, turn on the Trigger and Wayscript will handle the automation of the script for you.
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)