Giter Site home page Giter Site logo

fabston / telegram-airdrop-bot Goto Github PK

View Code? Open in Web Editor NEW
181.0 181.0 116.0 483 KB

๐ŸŽˆ Manage your Telegram Airdrops on ERC-20, BEP-20 etc. tokens.

License: MIT License

Python 100.00%
airdrop bep20 bnb bot cryptocurrency erc20 eth ethereum python telegram

telegram-airdrop-bot's People

Contributors

fabston avatar ghostwalkerj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram-airdrop-bot's Issues

Bot stop responding

Bot stop interacting after been inactive. If not used for a while bot it's not responding. I have to close the terminal and run'it again.

Near Blockchain Wallet ID's

hello,
i will add near blockchain adresses (xxx.near oder xxx.tg) but im getting this error:

Invalid $ETH address. Try again:

how can i fix it?
thx!

Missing handle

The handle to handle the calls need to be added before web.run_app.

# Process webhook calls
async def handle(request):
    if request.match_info.get('token') == bot.token:
        request_body_dict = await request.json()
        update = telebot.types.Update.de_json(request_body_dict)
        bot.process_new_updates([update])
        return web.Response()
    else:
        return web.Response(status=403)


app.router.add_post('/{token}/', handle)

Scalability (Polling or Webhook)

By default, Bot checks and receives updates from Telegram Servers by Polling (requests and get if there is any new updates in the Bot account corresponding to that Bot Token), this is really simple and can be used for low to median scale Bots. However, we need to configure the Bot to use a Webhook instead to handle a large number of users/groups.

To use Webhook instead Polling, we need a signed certificate file in the system, you can create the key file and self-sign the cert through openssl tool:

openssl req -newkey rsa:2048 -sha256 -nodes -keyout private.key -x509 -days 3650 -out cert.pem

Once you have the key and cert files, we need to setup the next lines in "config.py" file to point to expected Webhook Host address, port and certificate file:

"WEBHOOK_HOST": "Current system IP/DNS here",
"WEBHOOK_PORT": 8443,
"WEBHOOK_CERT" : SCRIPT_PATH + "/cert.pem",
"WEBHOOK_CERT_PRIV_KEY" : SCRIPT_PATH + "/private.key",

To use Polling instead Webhook, just set host value back to none:

"WEBHOOK_HOST": "None",

Error: No module named 'eth_utils'

Hello,
Thank you for sharing.
I tried running on a CentOS7 VPS but I get this error:

###################
(Telegram-Airdrop-Bot) [root@linux Telegram-Airdrop-Bot]# python main.py
Traceback (most recent call last):
File "main.py", line 12, in
import eth_utils
ModuleNotFoundError: No module named 'eth_utils'
###################

What should I do to fix this? Thank you very much

A request to the Telegram API was unsuccessful. Error code: 404. Description: Not Found

(Telegram-Airdrop-Bot) MacBook-Air:Telegram-Airdrop-Bot azeemsaim$ python main.py
Database tables created.
Traceback (most recent call last):
File "/Users/azeemsaim/Telegram-Airdrop-Bot/main.py", line 409, in
bot.remove_webhook()
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/init.py", line 377, in remove_webhook
return self.set_webhook() # No params resets webhook
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/init.py", line 352, in set_webhook
return apihelper.set_webhook(self.token, url, certificate, max_connections, allowed_updates, ip_address,
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/apihelper.py", line 295, in set_webhook
return _make_request(token, method_url, params=payload, files=files)
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/apihelper.py", line 158, in _make_request
json_result = _check_result(method_name, result)
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/apihelper.py", line 185, in _check_result
raise ApiTelegramException(method_name, result, result_json)
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 404. Description: Not Found
(Telegram-Airdrop-Bot) MacBook-Air:Telegram-Airdrop-Bot azeemsaim$ python main.py
Traceback (most recent call last):
File "/Users/azeemsaim/Telegram-Airdrop-Bot/main.py", line 409, in
bot.remove_webhook()
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/init.py", line 377, in remove_webhook
return self.set_webhook() # No params resets webhook
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/init.py", line 352, in set_webhook
return apihelper.set_webhook(self.token, url, certificate, max_connections, allowed_updates, ip_address,
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/apihelper.py", line 295, in set_webhook
return _make_request(token, method_url, params=payload, files=files)
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/apihelper.py", line 158, in _make_request
json_result = _check_result(method_name, result)
File "/Users/azeemsaim/Telegram-Airdrop-Bot/lib/python3.9/site-packages/telebot/apihelper.py", line 185, in _check_result
raise ApiTelegramException(method_name, result, result_json)
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 404. Description: Not Found
(Telegram-Airdrop-Bot) MacBook-Air:Telegram-Airdrop-Bot azeemsaim$

Twitter username

I will add the code later. In my version of airdrop bot i have added the option to add the twitter username after adding the wallet address.

Captcha / verification

Summary

The user has to solve a simple math equation before being able to enrol into the airdrop.

Basic example

Right after /starting the bot the user is greeted with a math equation (4+5). After solving it (9) the user will be able submit the airdrop form.

ERROR: Failed building wheel for yarl Failed to build cytoolz multidict yarl

ERROR: Failed building wheel for yarl
Failed to build cytoolz multidict yarl
ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly

Followed every other step and have everything set up correctly, using python 3.8.6.

"python3 -m pip install -r requirements.txt"

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.