This is a guide that explains how to display RSS feeds from your Discourse forum to your Discord server.
You need a Discord Bot. You can use a hosted bot with an RSS cog and add it to your server or install a self-hosted bot and configure it.
For this guide, we’ll use Red-DiscordBot because it is self-hosted. You can install it on your server. It’s very easy to maintain, highly customizable, and actively maintained.)
Setting up the bot
-
Follow this tutorial to install and configure Red.
-
Create a new bot account on Discord and add the bot to your Discord server.
Adding the RSS feeds (custom cog)
When the bot is online on your server, you need to add a new custom cog (RSS) from the approved repositories
In your Discord channel type the follow commands (replace !
with your bot prefix):
Allow install of third-party cogs:
!load downloader
Add aikaterna-cogs:
!repo add aikaterna https://github.com/aikaterna/aikaterna-cogs
Follow the instruction by typing I agree
.
Install the RSS cog:
!cog install aikaterna-cogs rss
Load the RSS cog:
!load rss
You now have an RSS cog to configure. Choose the channel you want to use to display your RSS feed.
The RSS feed will be added to the channel you’re currently in. You can add multiple RSS feeds in one channel.
Your RSS feeds names must be lowercase.
In the chosen channel, type:
!rss add discourse https://meta.discourse.org/latest.rss
where “discourse” is the name you assign to this RSS feed.
Each RSS feed must have a different name.
If you use more than one word in your feed name, you have to use double quotes:
!rss add "discourse announcements" https://meta.discourse.org/c/announcements/67.rss
You can preview the RSS feed by typing:
!rss force discourse
or, if your feed name contains spaces:
!rss force "discourse announcements"
By default, there is no formatting:
We can add a template to show additional information (e.g. the author) in the order of our choice:
!rss template discourse $author:\n$title\n$link
\n
creates a line break. You can also use Discord Markdown syntax in your template.
(optional) We can show the feed in an embed block. We’ll do that by typing:
!rss embed toggle discourse
Note that links won’t show a preview if the RSS feed is embedded.
As a last touch, we’ll add the feed name in the template, so we know where the feed comes from. It’s handy when we have multiple feeds in one channel, especially when they come from the same domain.
!rss template discourse **Discourse**\n$author:\n$title\n$link
For the discourse announcement feed:
!rss template "discourse support" **Discourse Announcements**\n$author:\n$title\n$link
To display help about the rss commands, type:
!rss help
Discourse RSS feeds
Last edited by @JammyDodger 2024-05-26T07:05:59Z
Check document
Perform check on document: