A Telegram Lightning
Bitcoin wallet and tip bot for group chats.
This repository contains everything you need to set up and run your own tip bot. If you simply want to use this bot in your group chat without having to install anything just start a conversation with @LightningTipBot and invite it into your group chat.
Setting up the bot
To build the bot from source, clone the repository and compile the source code.
git clone https://github.com/LightningTipBot/LightningTipBot.git cd LightningTipBot go build . cp config.yaml-example config.yaml
After the configuration (see below), start it using the command
You need to edit
config.yaml before starting the bot.
Create a Telegram bot
First, create a new Telegram bot by starting a conversation with the @BotFather. After you have created your bot, you will get an Api Token which you need to add to
telegram_api_key in config.yaml accordingly.
Set up LNbits
You can either use your own LNbits instance (recommended) or create an account at lnbits.com to use their custodial service (easy).
- Create a wallet in LNbits (
- Get the Admin key in the API Info tab of your user (
- Enable the User Manager extension.
- Get the Admin ID of the User Manager (
Getting LNbits keys
webhook_server: URL that can reach the bot. This is used for creating webhooks with LNbits to receive notifications about payments (optional).
db_path: User database file path.
transactions_path: Transaction log file path.
message_dispose_duration: Duration in seconds after which commands will be deleted from channel (only if the bot is channel admin).
<div class="snippet-clipboard-content position-relative" data-snippet-clipboard-copy-content="/tip 🏅 Reply to a message to tip it: /tip 
/balance 👑 Check your balance: /balance
/send 💸 Send funds to a user: /send 
/invoice ⚡️ Create a Lightning invoice to receive payments: /invoice 
/pay ⚡️ Pay a Lightning invoice: /pay
/help 📖 Read this help.
/info 📚 More info.
/donate 🙏 Donate to @LightningTipBot: /donate
/tip 🏅 Reply to a message to tip it: /tip <amount> [<memo>] /balance 👑 Check your balance: /balance /send 💸 Send funds to a user: /send <amount> <@username> [<memo>] /invoice ⚡️ Create a Lightning invoice to receive payments: /invoice <amount> [<memo>] /pay ⚡️ Pay a Lightning invoice: /pay <invoice> /help 📖 Read this help. /info 📚 More info. /donate 🙏 Donate to @LightningTipBot: /donate <amount>