Loading...

Telegram-RSS-Bot

Deliver your blog or website post to users
With this bot you can easily deliver your website/blog posts to users on telegram. users can use this bot directly or get feeds through a channel or group that bot had joined.
Free & Open-source
You can run your own Bot server without costs or create your own version.
Super easy
It's too easy to run and config server. just follow guides and no more.
Developing
This project is developing. You will find more features in future. You can suggest more features here.

Getting started

Follow Telegram instructions to create a new bot user and get your Bot-Token. keep your Bot-Token safe.

Then download latest release or use git clone.

        
git clone https://github.com/bsimjoo/Telegram_RSS_bot.git
        
      

Note: Telegram-RSS-Bot is always under active development, so if you're looking for a stable and safe release, use the compressed packages or checkout to release branch.

use this:

        
git checkout release
        
      

OR just run this command instead of the one above:

        
git clone https://github.com/bsimjoo/Telegram_RSS_bot.git --branch release
        
      

Update

Highly recommended to keep your server up to date. if you are using git you can do an update with git pull


Installation

First install python. I recommend Python v3.8+ because this project developed and tested with this version. So if you had any problem you can create an issue

change dir to source directory and install requirements with

        
cd Telegram-RSS-Bot
python3 -m pip install {--user} -r requirements.txt
        
      

--user flag is optional and may needed in some situation

Configuration

Read docs/Configuration-guide.md

Copy default configuration example config-example.conf to user-config.conf and add token to config file under main section

        
[main]
token = {your bot token}
        
      

Note that config-example.conf may be updated, so check for changes to each update. user-config.conf is ignored by git to prevent git pull problems

Run server

use python main.py to run server, you can also run server with a new config file with python main.py -c {config file path} (Default configurations are user-config.conf or config-example.conf). run python main.py -h to get help about available arguments.

Access levels

There are three levels of access for the bot. (Owner, Admins, Users)

Owner

The person who runs bot-server and has telegram-bot token. He usually has access to source code and Databases. Owner can also change source of feeds but default source is http://pcworms.blog.ir/rss read Installation at top

How the owner is identified

Owner (bot call him as lord!) can identify himself using the token he received previously from @botfather as follow

/start{bot-token}

Owner can:

Admin

A user can only be promoted as an administrator if the owner generates a one-time token with the /gentoken command and gives it to the user (this token is not the token previously received from BOTFATHER during the setup process). The user can then request once using the token they received, and the robot notifies its owner that the user is requesting a promotion, then the administrator can accept or decline the request. If the owner accepts the request, the user will be promoted and recognized as an administrator.

/start {one-time token generated by this bot}

Owner will Receive a message with admin information and accept/decline buttons.

Admins can:

Users can:

/help command will give you a list of all available command related to your access level.

Languages

Available languages are:

You can translate default-strings.json file to add more languages but this bot will use same language for all users. Owner and admin interface is hardcoded in english (except /help command).

Notice set your custom strings file path in configuration.

Reseting databases

If you're about to reset database you can use -r {database} argument to reset chats, data or all databases.

This action can not be undone

Bug Reporter

I wrote a module that reports exceptions or any custom message and counts them, then I can show the number of bugs of a running server and also build state and then track and fix bugs. The bug reporter is off by default, but if you are interested you can save the bugs to a local file bugs.json in offline mode, or run the bug report http server in online mode to see them through a http server (click on bugs or build at top to see an example). The default configuration of the http bug reporter is saved in Bug-reporter.conf but you can add your own config file to server config file (user-config.conf).

Notice Don't forget to install cherrypy before using http bug reporter. use python3 -m pip install cherrypy

License GPL-v3

This project licensed under GPL-v3

the "Telegram-RSS-Bot" logo and any parts thereof are Copyright (©) 2021 by BSimjoo. All rights reserved.


Using python-telegram-bot api this project began for pcworms.blog.ir weblog, but now it is available for everyone. you can see customized version at pcworms/PCworms_Bot

this is my first telegram bot!