Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Nov 15, 2023
1 parent 4b9e523 commit ba3e0eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func main() {
log.Warn(fmt.Sprintf("Failed to forward or pin the donation invoice in the chat %+v, cause: %s", chat, err))
switch tgCtx.Sender().ID {
case 362697048:
err = tgCtx.Send("Main menu reply keyboard", service.MakeMainMenuReplyKeyboad())
err = tgCtx.Send("Main menu reply keyboard", service.MakeMainMenu())
default:
err = tgCtx.Send("Main menu reply keyboard", menuKbd)
}
Expand Down
18 changes: 11 additions & 7 deletions service/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const LabelUsagePub = "Usage ᵖ"
const LabelMainMenu = "< Main Menu"

const LabelPub = "📢 Publish"
const LabelSub = " Subscribe"
const LabelSub = "🔍 Subscribe"

var btnSubList = telebot.Btn{
Text: LabelSubList,
Expand Down Expand Up @@ -63,10 +63,6 @@ var btnSub = telebot.Btn{
Text: LabelSub,
}

var btnMore = telebot.Btn{
Text: "More...",
}

var BtnMainMenu = telebot.Btn{
Text: LabelMainMenu,
}
Expand All @@ -84,12 +80,20 @@ func MakeReplyKeyboard() (kbd *telebot.ReplyMarkup) {
return
}

func MakeMainMenuReplyKeyboad() (kbd *telebot.ReplyMarkup) {
func MakeMainMenu() (kbd *telebot.ReplyMarkup) {
kbd = &telebot.ReplyMarkup{
ResizeKeyboard: true,
}
kbd.Reply(
kbd.Row(btnPub, btnSub, btnMore),
kbd.Row(btnPub, btnSub),
kbd.Row(
telebot.Btn{
Text: "Publications",
},
telebot.Btn{
Text: "Subscriptions",
},
),
)
return
}

0 comments on commit ba3e0eb

Please sign in to comment.