Skip to content

Commit

Permalink
new update
Browse files Browse the repository at this point in the history
  • Loading branch information
xbuddhi committed Aug 28, 2024
1 parent 7c55e40 commit ce8882f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 28 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
config.yaml
config.yaml*
data/*
!data/.placeholder
!data/.placeholder
LightningTipBot
LightningTipBot.exe
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center">
<img alt="logo" width="150" src="resources/logo_round.png" >
<img alt="logo" width="150" src="https://i.imgur.com/VB3zep8.png" >
</p>

# @LightningTipBot 🏅
# @BitcoinDeepaBot 🏅

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](https://t.me/LightningTipBot) and invite it into your group chat.
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 [@](https://t.me/BitcoinDeepaBot) and invite it into your group chat.

## Setting up the bot

Expand All @@ -15,16 +15,16 @@ This repository contains everything you need to set up and run your own tip 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
git clone /~https://github.com/BitcoinDeepaBot/BitcoinDeepaBot.git
cd BitcoinDeepaBot
go build .
cp config.yaml.example config.yaml
```

After the configuration (see below), start it using the command

```
./LightningTipBot
./BitcoinDeepaBot
```

### Configuration
Expand Down Expand Up @@ -86,14 +86,14 @@ You can either use your own LNbits instance (recommended) or create an account a

### Inline commands
```
send 💸 Send sats to chat: @LightningTipBot send <amount> [<memo>]
send 💸 Send sats to chat: @BitcoinDeepaBot send <amount> [<memo>]
```

📖 You can use inline commands in every chat, even in private conversations. Wait a second after entering an inline command and click the result, don't press enter.

### Inline send

You can use inline commands to send payments to anyone who can read your messages, even inside private chats and group chat in which the bot isn't part of. For that, you need to trigger an [inline command](https://core.telegram.org/bots/inline). Here is how it works: Enter the name of the bot (`@LightningTipBot`) and the command you want to trigger (`send 13 Hi friend!`). When the result pops up above the text field, click it to send it to the chat. Do not press enter.
You can use inline commands to send payments to anyone who can read your messages, even inside private chats and group chat in which the bot isn't part of. For that, you need to trigger an [inline command](https://core.telegram.org/bots/inline). Here is how it works: Enter the name of the bot (`@BitcoinDeepaBot`) and the command you want to trigger (`send 13 Hi friend!`). When the result pops up above the text field, click it to send it to the chat. Do not press enter.

<p align="center">
<img alt="Send sats inside any chat, including private conversations and groups." src="resources/inline_send.png" >
Expand Down Expand Up @@ -138,7 +138,7 @@ To minimize the clutter all the heavy tipping can cause in a group chat, the bot

## Full Guide to Install and run on a VPS

A complete guide to install and run LightningTipBot + LNBITS (on docker with PostgreSQL) on the same VPS with an external LND funding source has been prepared by Massimo Musumeci (@massmux) and it is available: [LightningTipBot full install](https://www.massmux.com/howto-complete-lightningtipbot-lnbits-setup-vps/)
A complete guide to install and run BitcoinDeepaBot + LNBITS (on docker with PostgreSQL) on the same VPS with an external LND funding source has been prepared by Massimo Musumeci (@massmux) and it is available: [BitcoinDeepaBot full install](https://www.massmux.com/howto-complete-lightningtipbot-lnbits-setup-vps/)

## Made with

Expand Down
3 changes: 2 additions & 1 deletion internal/telegram/buttons.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
// MainMenuCommandHelp = "📖 Help"
// MainMenuCommandSend = "⤴️ Send"
// SendMenuCommandEnter = "👤 Enter"
MainMenuCommandWebApp = "🗳️ App"
MainMenuCommandWebApp = "🤝 Community"
MainMenuCommandBalance = "Balance"
MainMenuCommandInvoice = "⚡️ Invoice"
MainMenuCommandHelp = "📖 Help"
Expand Down Expand Up @@ -81,6 +81,7 @@ func (bot *TipBot) appendWebAppLinkToButton(btn *tb.Btn, user *lnbits.User) {
if strings.HasPrefix(url, "https://") {
// prevent adding a link if not https is used, otherwise
// Telegram returns an error and does not show the keyboard
url = "https://t.me/c/1869805823"
btn.WebApp = &tb.WebAppInfo{Url: url}
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/telegram/inline_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
tb "gopkg.in/lightningtipbot/telebot.v3"
)

const queryImage = "https://avatars.githubusercontent.com/u/88730856?v=7"
const queryImage = "https://i.imgur.com/VB3zep8.png"

func (bot TipBot) inlineQueryInstructions(ctx intercept.Context) (intercept.Context, error) {
instructions := []struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/telegram/invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ func (bot *TipBot) invoiceHandler(ctx intercept.Context) (intercept.Context, err
}

// check for memo in command
memo := "Powered by @LightningTipBot"
memo := "Powered by @BitcoinDeepaBot"
if len(strings.Split(m.Text, " ")) > 2 {
memo = GetMemoFromCommand(m.Text, 2)
tag := " (@LightningTipBot)"
tag := " (@BitcoinDeepaBot)"
memoMaxLen := 159 - len(tag)
if len(memo) > memoMaxLen {
memo = memo[:memoMaxLen-len(tag)]
Expand Down
2 changes: 1 addition & 1 deletion internal/telegram/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func NewTransaction(bot *TipBot, from *lnbits.User, to *lnbits.User, amount int6
FromId: from.Telegram.ID,
ToId: to.Telegram.ID,
Amount: amount,
Memo: "Powered by @LightningTipBot",
Memo: "Powered by @BitcoinDeepaBot",
Time: time.Now(),
Success: false,
}
Expand Down
19 changes: 6 additions & 13 deletions translations/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,9 @@ payButtonEmoji = """💸"""

# HELP

helpMessage = """⚡️ *Wallet*
helpMessage = """⚡️ *BitcoinDeepa Wallet*
_This bot is a Bitcoin Lightning wallet that can sends tips on Telegram. To tip, add the bot to a group chat. The basic unit of tips are Satoshis (sat). 100,000,000 sat = 1 Bitcoin. Type 📚 /basics for more._
❤️ *Donate*
_This bot charges no fees but costs Satoshis to operate. If you like the bot, please consider supporting this project with a donation. To donate, use_ `/donate 1000`
%s
⚙️ *Commands*
Expand All @@ -77,7 +74,6 @@ _This bot charges no fees but costs Satoshis to operate. If you like the bot, pl
*/send* 💸 Send funds to a user: `/send <amount> @user or user@ln.tips [<memo>]`
*/invoice* ⚡️ Receive with Lightning: `/invoice <amount> [<memo>]`
*/pay* ⚡️ Pay with Lightning: `/pay <invoice>`
*/donate* ❤️ Donate to the project: `/donate 1000`
*/advanced* 🤖 Advanced features.
*/help* 📖 Read this help."""

Expand All @@ -97,16 +93,13 @@ _The Lightning Network is a payment protocol that enables fast and cheap Bitcoin
_Your funds on this bot can be sent to any other Lightning wallet and vice versa. Recommended Lightning wallets for your phone are_ [Phoenix](https://phoenix.acinq.co/)_,_ [Breez](https://breez.technology/)_,_ [Muun](https://muun.com/)_ (non-custodial), or_ [Wallet of Satoshi](https://www.walletofsatoshi.com/) _(easy)_.
📄 *Open Source*
_This bot is free and_ [open source](/~https://github.com/LightningTipBot/LightningTipBot) _software. You can run it on your own computer and use it in your own community._
_This bot is free and_ [open source](/~https://github.com/CeyLabs/BitcoinDeepaBot) _software. You can run it on your own computer and use it in your own community._
✈️ *Telegram*
_Add this bot to your Telegram group chat to /tip posts. If you make the bot admin of the group it will also clean up commands to keep the chat tidy._
🏛 *Terms*
_We are not custodian of your funds. We will act in your best interest but we're also aware that the situation without KYC is tricky until we figure something out. Any amount you load onto your wallet will be considered a donation. Do not give us all your money. Be aware that this bot is in beta development. Use at your own risk._
❤️ *Donate*
_This bot charges no fees but costs satoshis to operate. If you like the bot, please consider supporting this project with a donation. To donate, use_ `/donate 1000`"""
_We are not custodian of your funds. We will act in your best interest but we're also aware that the situation without KYC is tricky until we figure something out. Any amount you load onto your wallet will be considered a donation. Do not give us all your money. Be aware that this bot is in beta development. Use at your own risk._"""

helpNoUsernameMessage = """👋 Please, set a Telegram username."""

Expand Down Expand Up @@ -179,12 +172,12 @@ confirmSendMessage = """Do you want to pay to %s?\n\n💸 Amount: %d sat
confirmSendAppendMemo = """\n✉️ %s"""
sendCancelledMessage = """🚫 Send cancelled."""
errorTryLaterMessage = """🚫 Error. Please try again later."""
sendSyntaxErrorMessage = """Did you enter an amount and a recipient? You can use the /send command to either send to Telegram users like %s or to a Lightning address like LightningTipBot@ln.tips."""
sendSyntaxErrorMessage = """Did you enter an amount and a recipient? You can use the /send command to either send to Telegram users like %s or to a Lightning address like BitcoinDeepaBot@bitcoindeepa.com."""
sendHelpText = """📖 Oops, that didn't work. %s
*Usage:* `/send <amount> <user> [<memo>]`
*Example:* `/send 1000 @LightningTipBot I just like the bot ❤️`
*Example:* `/send 1234 LightningTipBot@ln.tips`"""
*Example:* `/send 1000 @BitcoinDeepaBot I just like the bot ❤️`
*Example:* `/send 1234 BitcoinDeepaBot@bitcoindeepa.com`"""

# INVOICE

Expand Down

0 comments on commit ce8882f

Please sign in to comment.