Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ data/*
LightningTipBot
LightningTipBot.exe
BitcoinDeepaBot
test_pay_api.sh
test_pay_api.sh
ANALYTICS_API.md
.gitignore
ANALYTICS_QUICKSTART.md
.claude/settings.local.json
analytics_requirements.txt
analytics_export.py
3 changes: 2 additions & 1 deletion botfather-setcommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
4 - Paste this:

help - Read the help.
balance - Check balance.
balance - Check balance.
transactions - List transactions
tip - Reply to a message to tip: /tip 50
send - Send funds to a user: /send 100 @LightningTipBot
sendbatch - Send to multiple users: /sendbatch
invoice - Receive with Lightning: /invoice 1000
pay - Pay with Lightning: /pay lnbc10n1ps...
donate - Donate: /donate 1000
Expand Down
46 changes: 46 additions & 0 deletions internal/telegram/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,22 @@ func (bot TipBot) getHandler() []InterceptionWrapper {
},
},
},
{
Endpoints: []interface{}{"/sendbatch"},
Handler: bot.sendbatchHandler,
Interceptor: &Interceptor{
Before: []intercept.Func{
bot.requirePrivateChatInterceptor,
bot.localizerInterceptor,
bot.logMessageInterceptor,
bot.requireUserInterceptor,
bot.lockInterceptor,
},
OnDefer: []intercept.Func{
bot.unlockInterceptor,
},
},
},
{
Endpoints: []interface{}{&btnSendMainMenu},
Handler: bot.keyboardSendHandler,
Expand Down Expand Up @@ -822,6 +838,36 @@ func (bot TipBot) getHandler() []InterceptionWrapper {
},
},
},
{
Endpoints: []interface{}{&btnConfirmSendBatch},
Handler: bot.confirmSendBatchHandler,
Interceptor: &Interceptor{
Before: []intercept.Func{
bot.localizerInterceptor,
bot.requireUserInterceptor,
bot.answerCallbackInterceptor,
bot.lockInterceptor,
},
OnDefer: []intercept.Func{
bot.unlockInterceptor,
},
},
},
{
Endpoints: []interface{}{&btnCancelSendBatch},
Handler: bot.cancelSendBatchHandler,
Interceptor: &Interceptor{
Before: []intercept.Func{
bot.localizerInterceptor,
bot.requireUserInterceptor,
bot.answerCallbackInterceptor,
bot.lockInterceptor,
},
OnDefer: []intercept.Func{
bot.unlockInterceptor,
},
},
},
{
Endpoints: []interface{}{&btnApproveAPITx},
Handler: bot.approveAPITransactionHandler,
Expand Down
Loading
Loading