Coder Social home page Coder Social logo

forqardsssss's Introduction

Telegram Forwarder Bot

  • Automatically forward messages from Channels and Groups (private or public)
  • Group channels into Thematic feeds
  • Clone all messages from any channel to your own channel

Get Telegram Api Id and Hash Id

https://my.telegram.org/auth?to=apps

Installation

1. Clone Repository

sudo apt update && sudo apt upgrade
git clone https://github.com/adityathebe/telegramForwarder.git

2. Install Mysql server && Create Databases

sudo apt-get install mysql-server
sudo apt-get install libmysqlclient-dev
mysql_secure_installation

Create the required Databases && Tables

mysql -u root -p
# Run the commands on bot/db/init.sql

Manage permission for mysql root user

$ mysql -u root -p

mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;

$ service mysql restart

NOTE: Might need to run mysql_secure_installation command after this

3. Install Python and required Packages

sudo apt install python3
sudo apt install python3-pip
cd agent
pip3 install -r requirements.txt

4. Install Nodejs and required Pacakges

sudo apt install nodejs
sudo apt install npm
cd bot
npm install -g pm2
npm install

5. Run the bot

Before running the node scripts, we need to configure the config files bot/config/* Take a look at the samples bot/config/sample-*.js

cd bot
pm2 start app.js

6. Run the python forwarder and Flask server

Before running the python scripts, we need to configure the config file agent/config/main.py. Take a look at the sample agent/config/config-sample.py

tmux new -s telethon

# Open two tmux panes
ctrl + b + %

# Run server
cd agent/api
python3 server.py

# Run Forwarder
Ctrl + b + RIGHT ARROW
cd agent/forwarder
python3 forwarder.py

# Detach from session
Ctrl + b + d

Issues

  • Join private entities via invitation link
  • Duplicate redirection
  • Shareable session
  • Multiple Worker Agents
  • utf8 encoding mysql database

FAQ:

-Q: How to start using the bot?
A: Send /start command to the bot and follow the instructions.

Q: Does the bot need admin permissions in a channel/group it forwards from?
A: No.

Q: Does the bot need admin permissions in a channel/group it forwards to?
A: Yes.

Q: Can I filter out ads or media content (videos, stickers, etc.)?
A: Yes.

Q: Can I set up automatic forwarding from another bot?
A: Yes.

Q: I don't have a link of a chat/group. Can I still setup forwarding from it? A: Yes.

Q: Can I clone all the messages from some channel to my own channel?
A: Yes.

Q: How to setup a Private bot plan?
A: Contact our support for details or leave your contact in the form below.

forqardsssss's People

Contributors

adityathebe avatar

Watchers

 avatar

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.