998ed1db58 Lnurl (#32)
* dunno

* fix user lookup

* lnurl port

* fix host

* add config example

* amount error msg

* print stack trace

* lnurl_public_server

* remove public server !

* smaller

* smaller

* webhooks

* add tag to response

* add EncodedMetadata and Status

* add success action and empty routes

* update invoice memo

* description hash

* dunno

* fix user lookup

* lnurl port

* fix host

* amount error msg

* add config example

* print stack trace

* lnurl_public_server

* remove public server !

* smaller

* smaller

* webhooks

* add tag to response

* add EncodedMetadata and Status

* add success action and empty routes

* update invoice memo

* description hash

* server log

Co-authored-by: gohumble <lngohumble@gmail.com>
2021-08-30 12:39:54 +02:00
2021-08-22 23:45:48 +02:00
2021-08-30 12:39:54 +02:00
2021-08-22 23:45:48 +02:00
2021-08-29 23:01:01 +02:00
2021-08-22 23:45:48 +02:00
2021-08-22 23:45:48 +02:00
2021-08-25 02:13:42 +02:00
2021-08-29 23:01:01 +02:00
2021-08-27 13:17:44 +02:00
2021-08-29 23:01:01 +02:00
2021-08-29 23:01:01 +02:00
2021-08-22 23:45:48 +02:00
2021-08-29 23:01:01 +02:00
2021-08-29 23:01:01 +02:00
2021-08-29 23:01:01 +02:00
2021-08-29 17:29:57 +02:00
2021-08-27 10:09:57 +02:00
2021-08-22 23:45:48 +02:00
2021-08-27 13:28:39 +02:00
2021-08-29 23:01:01 +02:00
2021-08-22 23:45:48 +02:00
2021-08-25 02:13:42 +02:00
2021-08-22 23:45:48 +02:00
2021-08-29 23:01:01 +02:00
2021-08-27 10:09:57 +02:00
2021-08-25 02:13:42 +02:00
2021-08-25 02:13:42 +02:00
2021-08-27 10:09:57 +02:00
2021-08-22 23:45:48 +02:00
2021-08-22 23:45:48 +02:00
2021-08-22 23:45:48 +02:00
2021-08-23 20:46:57 +02:00

logo

@LightningTipBot 🏅

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

Installation

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

./LightningTipBot

Configuration

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).

  1. Create a wallet in LNbits (lnbits_url).
  2. Get the Admin key in the API Info tab of your user (lnbits_admin_key).
  3. Enable the User Manager extension.
  4. Get the Admin ID of the User Manager (lnbits_admin_id).

Getting LNbits keys

How to set up a lnbits wallet and the User Manager extension.

More configuration

  • 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).

Features

Commands

/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>

Live tooltips

The bot replies to a tipped message to indicate to all participants how many and what amount of tips a post has received. This tooltip will be updated as new tips are given to a post.

How to set up a lnbits wallet and the User Manager extension.

Every user can link their wallet to an external app like Bluewallet or Zeus by using the command /link. If you host the bot, you will have to enable the LndHub extension in LNbits. You also need to edit the lnbits_public_url entry in config.yaml accordingly to an address that can be reached by the user's wallet (Tor should be fine as well).

QR code payment example.

Pay invoices by sending QR codes

To pay a Lightning invoice, you can snap a photo of a QR code and send it directly to the bot. Note that you might need to zoom in, center the QR code, or crop the image if the bot fails to decode the QR code from the photo. By the way, you can also just send an the invoice as a string, the bot will automatically detect it and initiate a payment.

QR code payment example.

Auto-delete commands

To minimize the clutter all the heavy tipping can cause in a group chat, the bot will remove all failed commands (for example due to a syntax error) from the chat immediately. All successful commands will stay visible for message_dispose_duration seconds (default 10s) and then be removed. The tips will sill be visible for everyone in the Live tooltip. This feature only works, if the bot is made admin of the group.

Made with

  • LNbits – Free and open-source lightning-network wallet/accounts system.
  • telebot – A Telegram bot framework in Go.
  • gozxing – barcode image processing library in Go.
  • ln-decodepay – Lightning Network BOLT11 invoice decoder.
S
Description
A tip bot and Bitcoin Lightning wallet on Telegram ⚡️
https://t.me/LightningTipBot
Readme MIT
118 MiB
v0.5.2
Latest
2026-11-13 20:24:11 +00:00
Languages
Go 98.3%
HTML 1.7%