Skip to content

Commit

Permalink
test donate
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Nov 9, 2023
1 parent fc7852d commit 14fa037
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,17 +347,16 @@ func main() {
if err == nil {
err = b.Pin(msg)
}
if err == nil {
switch chat.Type {
case telebot.ChatGroup:
err = subListHandlerFunc(tgCtx)
case telebot.ChatSuperGroup:
err = subListHandlerFunc(tgCtx)
case telebot.ChatPrivate:
err = tgCtx.Send("Main menu reply keyboard", menuKbd)
default:
err = fmt.Errorf("unsupported chat type (supported options: \"private\", \"group\", \"supergroup\"): %s", chat.Type)
}
log.Warn(fmt.Sprintf("Failed to forward or pin the donation invoice in the chat %+v, cause: %s", chat, err))
switch chat.Type {
case telebot.ChatGroup:
err = subListHandlerFunc(tgCtx)
case telebot.ChatSuperGroup:
err = subListHandlerFunc(tgCtx)
case telebot.ChatPrivate:
err = tgCtx.Send("Main menu reply keyboard", menuKbd)
default:
err = fmt.Errorf("unsupported chat type (supported options: \"private\", \"group\", \"supergroup\"): %s", chat.Type)
}
return
}, menuKbd),
Expand Down

0 comments on commit 14fa037

Please sign in to comment.