Giter VIP home page Giter VIP logo

discorss's Introduction

DiscoRSS

This Python script fetches the latest entries from multiple RSS feeds and sends them to a Discord channel. The bot uses the discord and feedparser libraries to interact with Discord and parse RSS feeds, respectively.

Dependencies

  • discord
  • feedparser
  • dotenv
  • pyyaml

How to Use

Critical prerequisites to install

  • run pip3 install -r requirements.txt

  • Rename the file .env.dev to .env

Step 1: Create a Discord bot

  1. Go to https://discord.com/developers/applications create an application

image-17.png

  1. Build a Discord bot under the application

image.png

  1. Click Reset Token and then copy the token

image.png

  1. Turn ALL INTENT ON

image.png

  1. Invite your bot to your server via OAuth2 URL Generator

image.png

Step 2: Storing the values

  1. Store the Discord Channel ID, Bot Token, RSS Feed URLs and Timezone to .env under the DISCORD_CHANNEL_ID, DISCORD_BOT_TOKEN, and RSS_FEED_URLS

image.png

You're all set.

Run the bot on the desktop

  1. Open a terminal or command prompt

  2. Navigate to the directory where you cloned the repository

  3. Run python3 main.py to start the bot

How the bot works

  • This bot works by periodically fetching the latest articles from one or more RSS feeds and sending them to specified Discord channels.

  • When the bot starts, it logs in to Discord using a bot token and sets up a loop that runs indefinitely. Inside the loop, the bot fetches the RSS feeds and checks for new articles. If a new article is found, the bot sends a message to the specified Discord channel with the article title and link.

  • The bot keeps track of which articles have already been sent to each channel using a YAML file called sent_articles.yaml. This file is updated every time a new article is sent, to ensure that duplicate articles are not sent to the same channel.

discorss's People

Contributors

fahadbinhussain avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

josebenitezg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.