Skip to content

Pradumnasaraf/DDRSS

Open in Gitpod

Daily Dev Really Simple Syndication (DDRSS) Bot

Publish Image to GitHub Container Registry Releases

DDRSS Bot is a user-specific Discord Bot, which help user to get all bookmarks and the latest bookmark on their discord chat. It also comes with a search feature to find the bookmarks which match the specific keywords.

Bot works on daily.dev shareable bookmark URL as source data.


πŸŽ‰ Winner project of daily.dev RSS Feed Hackathon.πŸŽ‰

πŸ‘¨β€πŸ’» Bot development and existence.

RSS Feed returns XML data, which is complicated and cannot use directly in apps and programs other than the website, by using feedparser -a Python package, I have converted the return data into JSON format, which is now easily extractable, and usable in building any kind of Apps and Bot (in our case).

Every time user calls a command, the bot request data from the API api.daily.dev/rss/a/***** (link vary user to user) and extract data like username, Blog/Article links, and title, and convert into JSON and return those data accordingly in the proper pre-structured message, depending on the command which the user input.


πŸ•ΉοΈ Using the Bot:

Step 1: First you need to invite the Bot to the server, you can click on the right button for invite. πŸ‘‰

Step 2: Set your daily.dev sharable bookmark URL by using command - /serurl <your sharable bookmark URL>

Click here: Tutorial for getting daily.dev Sharable Bookmark (RSS Feed link)
Shareable.Bookmark.mp4
Video Source - daily.dev Twitter

Step 3: It's done, now you can use a different slash command to perform the task.


✍️ Commands:

Bot use (/) as a prefix, that's every command will start with a slash (/). Every command is integrated into Discord Slash commands

  • /ddrss - to check whether the bot is working or not.

  • /allcmd - returns a list of all DDRSS Bot commands.

  • /serurl <your sharable bookmark URL> - will set the user daily dev rss bookmark url.

  • /bookmarks - returns all of the user's bookmarked posts. (latest - 5 post).

  • /latestbm - returns the user's latest bookmarked post.

  • /dailydev - returns a short description about daily.dev

  • /searchbm <Keyword> - search and returns user bookmarked posts matching that specific keyword.

Eg: /searchbm Open Source

⭐ Features:

  • User-specific - By user-specific it means returning data type varies from user to user.
  • Slash commands - Uses Slash commands, commands are directly integrated into the Discord message box, we don't need to remember any of the commands. Typing / will show up all the commands.

  • Search function - User can easily find their bookmarked posts, with the simple command /searchbm <Keyword>
  • Error handling - If a user tried to use the command like /bm or /latestbm without setting up the URL or setting up the wrong URL, the bot will handle that, and prompt them.

πŸ“Ή Tutorial

To get an overview and working of the Bot, please check out the video (By clicking the Thumbnail/Image below).

πŸ–±οΈ Using the project:

  • Fork this repository

  • Install all the dependencies from requirements.txt file. We can also use the command to install all the dependencies at once.

pip3 install -r requirements.txt 
  • Create a .env file in the root folder and add your Discord Token and like so, get the keys by creating a bot application in the Discord Developer Portal
DISCORD_TOKEN =   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Invite the bot to the server, with sending message and slash command permissions.
Like this

Image

  • Run python3 main.py in the terminal for running the bot.

🎯 Aim of the project:

This project was built to prove the concept that how RSS Feed can be so powerful and useful when we have to share, transfer and use bulk of data and also fetch the latest data/feed from the source.


πŸŽ‰ Winner project of daily.dev RSS Feed Hackathon.