How to use Discord to display Discourse RSS feed

So you want visualize RSS feed from your Discourse forum to your Discord server.

To do that 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.

I prefer Red-DiscordBot because it is self-hosted (you can install it on your server, it’s very easy to maintain, highly customizable and it has a very active community.)

Setting up the bot

  1. Follow this tutorial to install and configure Red.

  2. 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

Install feedparser, running this command on your shell pip3 install feedparser

In your Discord channel type the follow commands:

[p]repo add aikaterna

where [p] is your own bot’s prefix

[p]cog cog install aikaterna rss

Load the RSS cog:

[p]load rss

Now you have an RSS cog to configure. Choose the channel you want to use to visualize your RSS feed.

Note that every RSS is diplayed only in the channel you send the command, so you can add more RSS in one channel or you can add RSS for more (even all) channels (e.g. in #laboratory channel I have, in #general, in #assistance and so on…)


[p]rss add Discourse

where “Discourse” is the name I have assigned to this RSS. You can add more than one RSS, but every RSS must have a different name.

If you use more than one word in your feed name, you have to use the double quotes e.g.

[p]rss add "Discourse Support"

Now you can add a template. Links previews aren’t displayed by default.

[p]rss template Discourse $author:\n$title\n$link

To display link previews, you need to toggle the default embed style:

[p]rss embed toggle Discourse

You can still prevent link previews by wrapping $link with <>: <$link>

To force the feed preview type:

[p]rss force your-feed-name (e.g. [p]rss force Discourse)

This is the result without preview:

and with a preview:

To display help about the rss commands, type:

[p]rss help

Discourse RSS feeds

    latest posts (if your site is medium or big this link can create a lot of traffic in your Discord channel. Maybe create a channel only for RSS feed is better).

    for a particular topic (e.g. to follow the topic about Babble plugin)

    latest topics

    top rated topics

    posts and topics from a category (e.g. #support)

    latest posts from someone (change someone with an username, e.g. codinghorror )

    latest topics from someone (change someone with an username, e.g. codinghorror )

    all the public posts from a group (change team with the name of your group).

    all the public topics with a particular tag (e.g. to follow all the topics tagged #docker)