Developed for participating in BrightID bounties in gitcoin hackathon gr8.
This bot gives each person a free top-up.
This repository contains the source code of @top_up_gifter_bot and instructions for runnig a copy of yourself.
- Python3.6 or higher
- A Telegram API key
- A Telegram bot token
- A BrightID context
- A inax.ir account
git clone https://github.com/mrmousavi78/top-up-gifter-bot.git
cd top-up-gifter-bot
python3 -m venv venv && . venv/bin/activate
to create and activate a virtual environment.pip install -U -r requirements.txt
, to install the requirements.- Edit the
config.ini
file with your values. - Place your app
sponsor private key
in__main__.py
like this:sponsor_private_key='SPONSOR_PRIVATE_KEY'
- Place you own [inax.ir] account parameters in
top_up_gfter/plugins/messages.py
like this:
data = {
"method": "topup",
"username": "<inax.ir_username>",
"password": "<inax.ir_password>",
"amount": "<amount of credit card in IRT>",
"operator": user.operator,
"mobile": message.text,
"charge_type": "normal",
"order_id": str(randint(5,10000)),
"company": "top-up gifter bot"
}
- Run with
python -m top_up_gifter
. - Stop with Ctrl + C and
deactivate
the virtual environment.
For SDK bonus
BrightID SDK for Python
This bot uses python-brightid for integrating BrightID
Pooya Fekri developed this SDK and you can see the source code here: https://github.com/PooyaFekri/python-brightid
For running BrightID node bonus
Top-up Gifter will use its own BrightID node on http://node.topupgifter.com/brightid/v5/state
You can see Top-up Gifter on medium for guides on how to receive free top-up.