Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pradumnasaraf/ddrss

DDRSS Bot is a Discord Bot, which help user to get all bookmarks and the latest bookmark on their discord chat.
https://github.com/pradumnasaraf/ddrss

bot daily-dev discord discord-bot discord-py python

Last synced: 23 days ago
JSON representation

DDRSS Bot is a Discord Bot, which help user to get all bookmarks and the latest bookmark on their discord chat.

Awesome Lists containing this project

README

        

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Pradumnasaraf/DDRSS)


Daily Dev Really Simple Syndication (DDRSS) Bot

[![Publish Image to GitHub Container Registry](https://github.com/Pradumnasaraf/DDRSS/actions/workflows/publish-ghcr.yml/badge.svg)](https://github.com/Pradumnasaraf/DDRSS/actions/workflows/publish-ghcr.yml) [![Releases](https://github.com/Pradumnasaraf/DDRSS/actions/workflows/releases.yml/badge.svg)](https://github.com/Pradumnasaraf/DDRSS/actions/workflows/releases.yml)

**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`](https://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`](https://daily.dev/) sharable bookmark URL by using command - `/serurl `


Click here: Tutorial for getting daily.dev Sharable Bookmark (RSS Feed link)

https://user-images.githubusercontent.com/51878265/158066794-5129f6f5-15ae-4b99-a764-e3e59bef8631.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 ` - 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 ` - 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 `
- **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`](/resources/requirements.txt) file. We can also use the command to install all the dependencies at once.

```sh
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](https://discord.com/developers/applications)

```txt
DISCORD_TOKEN = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

- Invite the bot to the server, with sending message and slash command permissions.


Like this

![Image](https://user-images.githubusercontent.com/51878265/162361445-19b5f99e-6ec4-416c-a44a-461fb5d756a0.png)

- 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.