Commit graph

26 commits

Author SHA1 Message Date
calle
0631fd53eb
WIP: Satdress (#331)
* satdress rebase

* check config

* satdress rebase

* check config

* check for invoices

* return error

* Update inline photo v5 (#332)

* update url

* round logo

* resize

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* new logo (#333)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* help (#334)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* add file (#335)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* markdown (#336)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* satdress rebase

* check config

* satdress rebase

* check for invoices

* return error

* satdress works

* add lnbits

* timeout

* error checking

* small lnd

* errors

* button fix

Co-authored-by: LightningTipBot <88730856+LightningTipBot@users.noreply.github.com>
2022-04-29 14:28:12 +02:00
LightningTipBot
b07053172b
help (#334)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-04-16 00:20:52 +02:00
gohumble
bf643f103d
🪄 update telebot v3 🤖 (#325)
* 🚧 minor changes to all handlers...

* 🚧 passing callback to tryEditStack

* 🚧 edit and delete callback messages

* 🚧 refactor again

* 🚧 uncomment this

* 🚧 using ctx.Message().Text

* 🚧 refactor

* 🚧 refactor

* 🚧 uncomment

* context not queruy

* 🚧 update forked lightningtipbot

* 🚧 reset ArticleResult

* fix inline receive

* readd shop

* remove chat from shopView

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-03-27 22:19:38 +02:00
calle
71d8aa202c
Group invite link management (#310)
* group invite link

* link

* works

* ticketinvoiceevent type

* Add invoice event interface

* add AssertEventType

* generalize AssertEventType invocation

* wip: payment button

* all new

* callback

* fix TicketEvent Key()

* invoiceEvent in ticketEvent

* fix errors

* add payment button

* commission

* minimum price

* remove redundant ticket event data

* commission

* fixes

* update balance

* notify user if ticket < 10

* commission rounding error

* refactor

* refactor

* /join

* add /join handler

* fix handler

* fix /join

* fix handler

* fix /join interceptor

* add startUserInterceptor

* delete qr

* no test blyad

* fix defer

* message

Co-authored-by: gohumble <lngohumble@gmail.com>
2022-03-17 00:21:28 +01:00
LightningTipBot
70ecf335f2
honkhonk (#302)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-02-07 21:30:02 +01:00
gohumble
96292604c7
adding lnurl auth (#294)
* adding lnurl auth poc

* add response and translation

* refactor

* simpler

* using http bot client with proxy transport

* functions

* translations

* clean

* comment

* revert

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-01-22 23:25:21 +01:00
LightningTipBot
5a25f07bfb
callback responses (#279)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-01-09 22:20:42 +01:00
gohumble
4e812f7897
add errors to handler (#273)
* add errors to handler

* add errors to handlers

* shop fixes (#274)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* better log (#275)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* add errors to map

* more errors

* rename NoWalletError

* fix one panic (#276)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* add invalid type error

* Shop panic attempt 2 (#277)

* less log

* fix shop first view

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* make errors private

* add errors to handler

* add errors to handlers

* add errors to map

* more errors

* rename NoWalletError

* add invalid type error

* make errors private

* patch

* return handlers

* add noPrivateChat

* add invalid amount err

Co-authored-by: LightningTipBot <88730856+LightningTipBot@users.noreply.github.com>
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-01-09 21:39:09 +01:00
LightningTipBot
c6a064b332
Banned entirely (#259)
* do not react to banned users

* do not respond to banned

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-01-04 13:32:10 +01:00
LightningTipBot
3d3d7ab2f6
Send keyboard recommendation (#252)
* speed up tx lock

* yolo master

* keyboard with recent contacts

* translate message

* better query

* keyboard pops up

* log level

* skip keyboard if no entry

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-28 12:20:47 +01:00
gohumble
151ed39b04
add once + singleton click interceptor (#229)
* speed up tx lock

* yolo master

* add once + singleton click interceptor

* yoooo;

* stuff

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-26 00:23:58 +01:00
LightningTipBot
6b746447e5
add initial main menu keyboard. (#221)
Co-authored-by: lngohumble <lngohumble@gmail.com>
2021-12-25 02:50:58 +01:00
gohumble
6aa05c8faa
Callback response (#200)
* add answerCallbackInterceptor

* use answerCallbackInterceptor

* fix nil response
2021-12-24 02:22:41 +01:00
LightningTipBot
f9aed70869
Soft lock (#198)
* add Lock and Unlock soft

* Update mutex.go

* sync mutex

* mutex bracket

* add idInterceptor

* context lock

Co-authored-by: lngohumble <lngohumble@gmail.com>
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-24 00:12:57 +01:00
LightningTipBot
f8fadb1729
Onlysats (#181)
* speed up tx lock

* add shops

* shop

* scrolling

* 🚀 add state stateCallbackMessage 🚀

* no shop

* scroll

* add shop browser

* scroll bug

* add buttons.go

* scrolling

* shop

* lnurl print after serving

* shop deletion

* adding and removing shops

* display photo captions

* refactor

* shops

* shops

* files work

* rename shop

* error handling

* fixes

* payments

* confirm delete all shops

* adding new items fix

* own bunt db for shop

* unlock transaction

* remove double print

* add transaction.Lock(id)

* unlock getShop

* add default interceptors to shop

* more files

* go sleep

* add fileStateResetTicker

* async sleep

* add runtime.ResettableFunctionTicker

* remove default duration

* generalized concurrent mutex

* simplify function ticker

* status message ticker queue

* add start index to shopViewDeleteAllStatusMsgs

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
Co-authored-by: lngohumble <lngohumble@gmail.com>
2021-12-23 10:16:13 +01:00
gohumble
f85ec34bcc
fix lock intercept (#176) 2021-12-22 17:48:30 +01:00
gohumble
8b40253169
remove default interceptors (#174)
* defer intercept after before intercept error check.

* log trace level

* get rid of default interceptors

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-22 17:34:57 +01:00
gohumble
f6768b72ea
Mutex lock per Telegram User ID (#156)
* lets go

* dunno

* fix after interceptor

* getTelegramUserFromInterface

* clean up requireUserInterceptor

* clean up bs

* cleanup

* cleanup2

* add comment

* fix before default interceptor

* async sleep

* back to 60

* remove newline

* adding defer interceptor

* handlers tighter

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-07 22:55:21 +01:00
LightningTipBot
ba6bf0a317
telebot fork user ID int64 (#151)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-01 11:24:28 +01:00
LightningTipBot
0abe56dfba
Revert "telebot fork user ID int64 (#149)" (#150)
This reverts commit 7c8ba7895d.
2021-12-01 08:59:51 +01:00
LightningTipBot
7c8ba7895d
telebot fork user ID int64 (#149)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-01 08:52:47 +01:00
LightningTipBot
0653498e0f
Lnurl withdraw (#129)
* go-lnurl --> v1.8.4

* clean up comments

* delete HandleLNURL()

* lnurl-withdrawal

* actual file

* remove comments

* remove comments

* refactor translation

* translations

* add type check and

* translations

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
Co-authored-by: lngohumble <lngohumble@gmail.com>
2021-11-14 22:25:47 +01:00
LightningTipBot
c90cfd9d8a
tipjar (#114)
* tipjar

* tipjar

* fix pointers and wallet keys

* better comment
2021-10-27 11:55:59 +02:00
LightningTipBot
236097a461
inline send and receive to specific user (#103) 2021-10-17 16:13:41 +02:00
gohumble
94eff98f60
bunt transaction generalization (#73)
* add generalized bunt database transaction

* use bunt tx for inline faucet and send

* use bunt tx for inline receive

* use bunt tx for inline send

* use bunt tx for pay

* fix typo

* readd context

* add generalized bunt database transaction

* use bunt tx for inline faucet and send

* use bunt tx for inline receive

* use bunt tx for inline send

* use bunt tx for pay

* fix typo

* readd context

* some fixes

* tigher error checking

* add CreatedAt and UpdatedAt flags

* check error in GetTransaction

* add bunt transaction package and rename stuff

* use transaction.Base as function receiver for transaction functions

* add transaction.Base.Set function

* fix tiptooltip bunt index

* refactor

* auto update updated at

* refactor

* remove balance from error

* fix updated at

* faucet errors

* add generalized bunt database transaction

* use bunt tx for inline faucet and send

* use bunt tx for inline receive

* use bunt tx for inline send

* use bunt tx for pay

* fix typo

* readd context

* some fixes

* tigher error checking

* add generalized bunt database transaction

* use bunt tx for inline faucet and send

* use bunt tx for inline send

* add CreatedAt and UpdatedAt flags

* check error in GetTransaction

* add bunt transaction package and rename stuff

* use transaction.Base as function receiver for transaction functions

* add transaction.Base.Set function

* fix tiptooltip bunt index

* refactor

* auto update updated at

* fix updated at

* faucet errors

* refactor

* remove balance from error

* rebase fixes

* fix imports

* fix de string

* fix receive and send

* faucet language

* remove pay constructor

* release faucet

* remove redundant inTransaction

* remove constructor

* remove constructor

* transaction get pointer receiver

* send race condition

* inactivate in db

Co-authored-by: LightningTipBot <hWOofXvq4m@mail.com>
2021-10-08 00:46:52 +03:00
LightningTipBot
903cc3c2e2
Lnurlp comments (#89)
* lnurl comments for RECEIVING

* fix import cycle

* fix import

* rename WebhookServer to Server

* rename LNURLInvoice to Invoice

* add str package. MarkdownEscape lnurl.Invoice comment

* add str package

* check for comment length

* lnurl pay with comment

* lnurl pay with comment

* check for wallet existence

* repackage main to internal

Co-authored-by: lngohumble <lngohumble@gmail.com>
2021-10-07 00:21:21 +03:00
Renamed from handler.go (Browse further)