DEV Community

Derrick Sherrill for WayScript

Posted on

Send RSS Feeds to Discord Bots with WayScript

Introduction

Staying informed today is capital for teams: you must be aware of market news, you must know the next moves of your competitors and be alerted of new releases.

Many blogs exist for this purpose and we can easily get the articles via RSS.

Today, we’ll create a script that posts the last article of Techcrunch in a Discord Channel

Prerequisites

No prerequisites but here are some contents you might find useful :

Time Trigger

For this example, the script will run hourly. As Techcrunch produces more than 25 articles per day, the choice of the time is fairly good.

Configuring Time Trigger

RSS Feed

Wayscript provides a module that lets you retrieve RSS items with a given URL. You can get links to the most popular Word news RSS feed here. We will use TechCrunch RSS feed link https://feeds.feedburner.com/TechCrunch/.

Configuring RSS feed module

If you've finished the configuration, you will notice new created variable.

RSS feed struct

Well, this variable contains a lot of information such as articles title, links, authors, etc. But here we want the latest article, so we’ll retrieve the first entry and register it in a variable.

Create a variable

Add a new step and select add variable.

Creating variables

For the sake of simplicity, we will register the first entry in a new variable. Now we can easily manipulate this item.

Discord

Work with Discord using Wayscript platform is ver easy. You can write or read message on a channel and seamlessly create bots. Add Discord a new step and let’s configure it.

Discord Configuration

Great! We can write the message we want to post on the channel.

Message

I only used the RSS item link only because Discord will automatically embed the message.

Post on channel image

Isn't it beautiful? :)

Conclusion

Questions about this script or anything else? Join our discord. We're always around to help. If you want to work the full script template, just find it here.

Top comments (0)