mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-13 12:33:14 +02:00
* 🚧 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>
24 lines
1,020 B
Go
24 lines
1,020 B
Go
package telegram
|
|
|
|
import (
|
|
"github.com/LightningTipBot/LightningTipBot/internal/lnbits"
|
|
"github.com/LightningTipBot/LightningTipBot/internal/telegram/intercept"
|
|
)
|
|
|
|
type StateCallbackMessage map[lnbits.UserStateKey]func(ctx intercept.Context) (intercept.Context, error)
|
|
|
|
var stateCallbackMessage StateCallbackMessage
|
|
|
|
func initializeStateCallbackMessage(bot *TipBot) {
|
|
stateCallbackMessage = StateCallbackMessage{
|
|
lnbits.UserStateLNURLEnterAmount: bot.enterAmountHandler,
|
|
lnbits.UserEnterAmount: bot.enterAmountHandler,
|
|
lnbits.UserEnterUser: bot.enterUserHandler,
|
|
lnbits.UserEnterShopTitle: bot.enterShopTitleHandler,
|
|
lnbits.UserStateShopItemSendPhoto: bot.addShopItemPhoto,
|
|
lnbits.UserStateShopItemSendPrice: bot.enterShopItemPriceHandler,
|
|
lnbits.UserStateShopItemSendTitle: bot.enterShopItemTitleHandler,
|
|
lnbits.UserStateShopItemSendItemFile: bot.addItemFileHandler,
|
|
lnbits.UserEnterShopsDescription: bot.enterShopsDescriptionHandler,
|
|
}
|
|
}
|