Skip to main content

A Discord bot that delivers RSS feed updates in real-time.

Project description

discord-rss-bot

linting: pylint pylint score code style: black License: MIT Poetry GitHub top language GitHub Release

A Discord bot that delivers RSS feed updates in real-time to your servers.

Enpowered by Feed Reader. Inspired by FeedCord.

Preview

Features

  • 🔄 Automated RSS Feed Updates – Periodic updates with configurable intervals.
  • 📜 Enhanced Message Formatting – Attempts to convert HTML to Markdown, truncates long summaries without breaking formatting.
  • 🖼️ Image & Media Support – Uses the first image as an embed cover for rich Discord embeds.
  • ⚡ Efficient & Scalable – Optimized with async processing and concurrent execution.
  • 🐋 Dockerized for Easy Deployment – Run anywhere with minimal setup (linux/amd64 & linux/arm64 supported).

Configuration

  1. Create a Discord server. See also How do I create a server?
  2. Create a Discord bot account and get its token. See also Creating a bot account
  3. Add the bot to your Discord server & channels.

The bot is configured via a YAML file. Here is an example:

db_path: data/rss.sqlite3 # path to the database
feeds:

  # Releases of this project
  - feed_url: https://github.com/VioletCranberry/discord-rss-bot/releases.atom
    channel_id: 1336277462<redacted>
    update_interval: 30

  # Hacker news daily (Kudos to Colin Percival)
  - feed_url: https://www.daemonology.net/hn-daily/index.rss
    channel_id: 1334640995<redacted>
    update_interval: 30 # optional, defaults to 60 minutes if not provided

  # Ask hacker news weekly (Kudos to Colin Percival)
  - feed_url: https://www.daemonology.net/hn-weekly-ask/index.rss
    channel_id: 1335575467<redacted>
    update_interval: 30

  # Github - trending (all languages) daily
  - feed_url: https://mshibanami.github.io/GitHubTrendingRSS/daily/all.xml
    channel_id: 1336324646<redacted>
    update_interval: 30

  # Github - trending (all languages) weekly
  - feed_url: https://mshibanami.github.io/GitHubTrendingRSS/weekly/all.xml
    channel_id: 1336383236<redacted>
    update_interval: 30

  # Hacker News Best - top vote getters from the past few days
  - feed_url: https://hnrss.org/best
    channel_id: 1335577844<redacted>
    update_interval: 30

  ...

Pypi package

pip install discord-rss-bot
mkdir data && python -m discord_rss_bot --token ${DISCORD_BOT_TOKEN} --config config.yaml

Docker run

docker run \
  -v $(pwd)/config.yaml:/app/config.yaml \
  -v $(pwd)/data:/app/data \
  ghcr.io/violetcranberry/discord-rss-bot:latest --token ${DISCORD_BOT_TOKEN}

Docker compose

discord-rss-bot:
  # Note: pin the image version to a specific release tag for production use
  image: ghcr.io/violetcranberry/discord-rss-bot:latest
  container_name: discord-rss-bot
  environment:
      - DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}
  volumes:
    - ./config.yaml:/app/config.yaml
    - ./data:/app/data
  restart: unless-stopped
  healthcheck:
      test: ["CMD", "curl", "--fail", "http://localhost:8080/healthz"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 10s
  # command:
    #   - "--token=${DISCORD_BOT_TOKEN}"
    #   - "--debug"
    #   - "--config=/app/config.yaml"

Local development

git clone https://github.com/VioletCranberry/discord-rss-bot.git && cd discord-rss-bot
poetry install --with dev

poetry run python -m discord_rss_bot <args>
poetry run pylint --verbose discord_rss_bot
poetry run black --verbose discord_rss_bot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discord_rss_bot-0.1.9.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discord_rss_bot-0.1.9-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file discord_rss_bot-0.1.9.tar.gz.

File metadata

  • Download URL: discord_rss_bot-0.1.9.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for discord_rss_bot-0.1.9.tar.gz
Algorithm Hash digest
SHA256 ca3b816e1416855976a14502e0099430a1b91832cac7f69ec5be8274bce60200
MD5 69f1e6dfcd4e501b3930a1a9ba76c0d5
BLAKE2b-256 a0f6a6c3897e109884199b2425f1e373daa9ed24b8ea24150288d5487979895d

See more details on using hashes here.

File details

Details for the file discord_rss_bot-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: discord_rss_bot-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for discord_rss_bot-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f17f95b8664ddcb689238459aeb7ec5de16d5e45b2bb109ac8194b05b8254355
MD5 c699b3da3e608c06c4ac24f96e518195
BLAKE2b-256 26a569e77113885b2e7f92cd93e1b659252d192b224e2dbb7cf363a9fac57186

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page