3289a7275a26cacadf14d250dcf2abf130a2da3a
Discord RSS Bot
A Discord bot that reads messages from a channel, stores them in SQLite, and serves them as an RSS feed.
Setup
1. Create a Discord Bot
- Go to Discord Developer Portal
- Click "New Application" and give it a name
- Go to the "Bot" section and click "Add Bot"
- Copy the bot token
- Under "Privileged Gateway Intents", enable:
- Server Members Intent
- Message Content Intent
- Go to "OAuth2" > "URL Generator"
- Select scopes:
bot - Select bot permissions:
Read Messages/View Channels,Send Messages - Use the generated URL to invite the bot to your server
2. Configure Environment
cp .env.example .env
Edit .env and add:
DISCORD_TOKEN- Your bot tokenDISCORD_CHANNEL_ID- The channel ID to monitor (enable Developer Mode in Discord to copy channel IDs)
3. Install Dependencies
npm install
4. Run
npm start
Usage
RSS Feed
Access the RSS feed at:
http://localhost:3000/rss/{channel_id}
Or with a custom limit:
http://localhost:3000/rss/{channel_id}?limit=20
List Available Channels
GET http://localhost:3000/rss/
Manually Trigger Fetch
POST http://localhost:3000/fetch/{channel_id}
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /rss |
List all channels with messages |
| GET | /rss/:channelId |
Get RSS feed for a channel |
| GET | /rss/:channelId?limit=N |
Get RSS feed with N messages |
| POST | /fetch/:channelId |
Trigger message fetch |
| GET | /health |
Health check |
Configuration
| Variable | Default | Description |
|---|---|---|
DISCORD_TOKEN |
- | Discord bot token |
DISCORD_CHANNEL_ID |
- | Channel to monitor |
PORT |
3000 | Server port |
BASE_URL |
http://localhost:3000 | Base URL for RSS links |
FETCH_INTERVAL_MS |
300000 | Auto-fetch interval (5 min) |
Database
Messages are stored in data/messages.db (SQLite). The database is created automatically on first run.
Description
Languages
JavaScript
100%