Example of Telegram bot that can recieve payments in TON.
All sources are in src
directory
src/bot.py
is a program to run Telegram bot
src/config.py
is a config file
src/db.py
is a module to interact with sqlite3 database
src/ton.py
is a module to handle payments in TON
You need to complete 4 simple steps to set up and run the bot
git clone https://github.com/Gusarich/ton-bot-example.git
cd ton-bot-example
pip install -r requirements.txt
# or
poetry install
Open file src/config.py
and enter your Bot token, Deposit address and Toncenter API key.
You can also switch between Mainnet and Testnet there by changing RUN_IN_MAINNET
to True
or False
python src/bot.py
# or
poetry run python3 src/bot.py