Hello! In this tutorial, I’ll show you how to set up a discord bot with RSS feeds!
Plus in this tutorial: previously sent RSS feeds are persistant between updates.
First, fork (or clone with git) this repository. It’s a modified copy of this repository, adapted by me to be fit for Koyeb.
The only thing you’ll need to change is the appsettings.json
. Here is an example configuration (note: JSON does not support comments, so remove these before using):
{
"Instances": [
{
"Id": "My First News Feed",
"YoutubeUrls": [
"https://www.youtube.com/feeds/videos.xml?channel_id=UCX6OQ3DkcsbYNE6H8uQQuVA" // example, MrBeast
],
"RssUrls": [
"http://feeds.bbci.co.uk/news/world/rss.xml" // example, BBC
],
"Forum": false, // IMPORTANT | if your webhook is in a forum channel set this to true
"DiscordWebhookUrl": "https://discord.com/api/webhooks/ID/TOKEN", // IMPORTANT | your discord webhook url
"RssCheckIntervalMinutes": 20,
"EnableAutoRemove": false,
"Color": 8411391,
"DescriptionLimit": 250,
"MarkdownFormat": false,
"PersistenceOnShutdown": true,
"PersistenceFolderPath": "/app/persistence" // IMPORTANT | path to your Koyeb volume
}
],
"ConcurrentRequests": 40
}
Next, go to Koyeb and open the Volumes section. Create a volume and set its Size
to 10 GB (better safe than sorry). The Name
and Region
can be anything; just pick a region close to your instance.
Then, create a new instance. In the settings, set Builder
to Dockerfile
(no need to change location or command). Under settings → Volumes, add the volume you created, and set the Mount path
to exactly the same path as PersistenceFolderPath
in your appsettings.json
(default is /app/persistence
).
After saving and deploying, your bot should be running and monitoring your feeds!
If you encounter any issues, feel free to reply here or send me a DM.
Overview of all variables possible in appsettings.json
:
Required:
- string Id
- string[] RssUrls
- string[] YoutubeUrls
- string DiscordWebhookUrl
- int RssCheckIntervalMinutes
- int DescriptionLimit
- bool Forum
- bool MarkdownFormat
- bool PersistenceOnShutdown
- string PersistenceFolderPath
Optional:
- string Username
- string AvatarUrl
- string AuthorIcon
- string AuthorName
- string AuthorUrl
- string FallbackImage
- string FooterImage
- int Color
- bool EnableAutoRemove
- List<PostFilters> PostFilters
- Dictionary<string, string[]> Pings
- int ConcurrentRequests
Image of the standard appsettings.json
: