svtcore / telegram-referral-bot

Invite Telegram accounts as referrals to bots, using your referral code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Telegram Referral Bot

Script to add Telegram accounts as referrals to bots, using your invite code

Screenshoot

1. Install necessary libraries

pip install -r requirements.txt

2. Open the .env file and edit the data according to your needs

Description for fileds

  • BOT_NAME - The public name of the bot without the @ symbol (e.g., example_random_bot)
  • COUNT - The quantity of accounts to be used
  • REFER_ID - Your referral ID obtained from the bot (e.g., t.me/example_random_bot?start=12345, ONLY set 12345)
  • CHANNEL_NAME - The username of the channel that must be joined [OPTIONAL]
  • DELAY_MIN - The minimum delay in seconds between each account's operation
  • DELAY_MAX - The maximum delay in seconds between each account's operation

3. Retrieve the API_ID and API_HASH for each account

  • Go to https://my.telegram.org. Log in to the site and create a new application; it will provide you with your credentials

4. Create a file for your credentials, such as accounts.txt, and input the data in the following format:

Example

SESSION_NAME:API_ID:API_HASH
MY_ACCOUNT_1:11223344:d54d1702ad0f8326224b817c796763c9

5. If you plan to use a proxy, create a file for it in this format:

NO PROXY (leave file empty)
IP:PORT
IP:PORT:LOGIN:PASSWORD

6. Create session files and authorize on each account

python bot.py --auth --tokens accounts.txt

7. After authorization is complete, session files will be generated in the 'sessions' folder

8. Run the script to begin inviting accounts using your referral code

python bot.py --run --tokens accounts.txt

or with proxy

python bot.py --run --tokens accounts.txt --proxies proxies.txt

If the bot requires joining a channel, you should set up the channel name in the .env file and follow the command below

python bot.py --run --tokens accounts.txt --channel

Note: All files, such as accounts.txt and proxies.txt, must be located in the root of the project folder

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. If the script returns an error, open an issue with the provided error message

License

MIT

Involved libraries

Responsibility

All materials are provided for educational purposes only. The author does not bear the responsibility of the consequences of use by other users

About

Invite Telegram accounts as referrals to bots, using your referral code

License:MIT License


Languages

Language:Python 100.0%