This is a Discord bot that can transfer TLO between users. It supports:
- Deposit TLO
- Tip TLO to Discord users
- See your account info and TLO balance
- Withdraw TLO to your wallet
Requirements
- MongoDB
- walletd (wallet daemon)
- Talleod (coin daemon)
- Python 3.8
- Discord Bot Token
I recommend using supervisor
to keep Talleod
, walletd
and bot.py
running.
Here are some sample configs:
[program:bot]
command = /path/to/bin/python /path/to/talleo-tip-bot/talleo_tip_bot/bot.py --config /path/to/config.yml
user = user
autostart = yes
autorestart = yes
environment = LC_ALL="C.UTF-8",LANG="C.UTF-8"
[program:Talleod]
command = /path/to/Talleod
user = user
autostart = true
autorestart = true
directory = /path/to
environment=HOME="/home/user"
[program:walletd]
command = /path/to/walletd --container-file wallet/tip_wallets --container-password ****** --rpc-password ******
user = user
autostart = true
autorestart = true
directory = /path/to
environment=HOME="/home/user"
You will also need to make a copy of config.yml.sample
to config.yml
and
change the values so they work with your setup.
This project can most certainly be adapted to any CryptoNote coin. You most likely won't have to change much.
- Change or remove the regex validation in
talleo_tip_bot.models:WalletAddressField
to match the address prefix of your coin. - Adapt the
TALLEO_DIGITS
andTALLEO_REPR
to match your coin.
Discord Commands
$register <wallet_address>
: Register a wallet to your account. Will be used to withdraw later.$info
: See your deposit and withdrawal addresses.$balance
: See your current available and pending balance.$tip <user_mention> <amount>
: Tip<amount>
TLO to<user_mention>
.$withdraw <amount>
: Withdraws<amount>
to your registered withdrawal address.
This project uses Pipfile
, pipenv
and tox
. To setup your environment
simply run tox
. You can check the tox.ini
file to see available environments
and commands that run within each of them.