https://github.com/merc1er/bchtipbot
Telegram Bitcoin Cash Tipping Bot
https://github.com/merc1er/bchtipbot
bitcoin bitcoincash bot telegram tipping
Last synced: 4 months ago
JSON representation
Telegram Bitcoin Cash Tipping Bot
- Host: GitHub
- URL: https://github.com/merc1er/bchtipbot
- Owner: merc1er
- Created: 2019-07-09T10:05:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T10:15:35.000Z (about 2 years ago)
- Last Synced: 2024-06-11T04:38:36.932Z (about 2 years ago)
- Topics: bitcoin, bitcoincash, bot, telegram, tipping
- Language: Python
- Homepage: https://t.me/BCHtipbot
- Size: 358 KB
- Stars: 19
- Watchers: 4
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Bitcoin Cash Telegram tipping bot
---
### 📱 Usage
**Simply open https://t.me/BCHtipbot and talk to the bot.**
#### List of commands
##### Tipping
```
/start - Starts the bot
/deposit - Displays your Bitcoin Cash address for top up
/balance - Shows your balance in Bitcoin Cash
/withdraw - Withdraw your funds. Usage: /withdraw amount|all address
/help - Lists all commands
/tip - Sends a tip. Usage: /tip amount [@username]
```
Note that you can also tip satoshis with, for example: `/tip 2000 satoshi @merc1er`.
##### Price
```
/price - Displays the current price of Bitcoin Cash. Usage: /price [currency_code]
```
For example: `/price` (defaults to USD), `/price eur`, `price BTC` and so on.
### ⚙️ Run development server
Run the following commands:
```shell
pip install -r requirements-dev.txt
python3 tipbot/app.py
```
Credentials and API keys are stored in environment variables (recommended) or in `settings.py` (not recommended for production).
##### Run tests
Simply do:
```shell
python run_tests.py
```
Or, if you want to check coverage, do:
```shell
pip install coverage # if you don't have it already
coverage run -m unittest
coverage html
```
then open the `htmlcov/index.html` page in a browser.
##### Linting
This project uses [`black`](https://github.com/psf/black) Python code formatter. Use the following command to format your code:
```shell
black .
```
##### Customize the bot
⚠️ Add the following environment variables:
```shell
FEE_ADDRESS # the Bitcoin Cash address where you want to collect the fees
FEE_PERCENTAGE # how much fee you want to charge per tip (over $1)
TOKEN # is the Telegram API token for the development bot (not for prod)
ADMIN_LIST # you may add your Telegram username to the list to use the admin commands
```
---
### 🚀 Deployment
Deployments are automatic on `master` if tests pass.
To deploy your own bot, add the environment variables found in the section above (⚠️) and read **[this page](https://github.com/python-telegram-bot/python-telegram-bot/wiki/Hosting-your-bot)**.
---
### To do
- Reply with stickers
- Queues with Celery/rq
- Implement more tests
- Allow users without a username to use the bot
- Sometimes the bot doesn't get triggered with the `/tip` command while not admin