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 71f3d23 commit 4502ea3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ func main() {
service.LabelUsageSub: subscriptions.Usage(clientAwk, groupId),
service.LabelPublishing: messages.Details,
service.LabelPubMsgBasic: messages.PublishBasicRequest,
service.LabelPubs: messages.Details,
service.LabelSubs: subscriptions.ListHandlerFunc(clientAwk, chatStor, groupId),
service.LabelUsagePub: pubUsageHandler.Show,
service.LabelMainMenu: func(tgCtx telebot.Context) error {
return tgCtx.Send("Main menu reply keyboard", menuKbd)
Expand Down
30 changes: 18 additions & 12 deletions service/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const LabelUsagePub = "Usage ᵖ"
const LabelMainMenu = "< Main Menu"

const LabelPub = "📢 Publish"
const LabelPubs = "Publishing >"
const LabelSub = "🔍 Subscribe"
const LabelSubs = "Subscriptions >"

var btnSubList = telebot.Btn{
Text: LabelSubList,
Expand Down Expand Up @@ -57,10 +59,24 @@ var btnUsagePub = telebot.Btn{

var btnPub = telebot.Btn{
Text: LabelPub,
WebApp: &telebot.WebApp{
URL: "https://awakari.app/msg-new.html",
},
}

var btnPubs = telebot.Btn{
Text: LabelPubs,
}

var btnSub = telebot.Btn{
Text: LabelSub,
WebApp: &telebot.WebApp{
URL: "https://awakari.app/sub-new.html",
},
}

var btnSubs = telebot.Btn{
Text: LabelSubs,
}

var BtnMainMenu = telebot.Btn{
Expand All @@ -85,18 +101,8 @@ func MakeMainMenu() (kbd *telebot.ReplyMarkup) {
ResizeKeyboard: true,
}
kbd.Reply(
kbd.Row(
btnPub,
telebot.Btn{
Text: "📢 More >",
},
),
kbd.Row(
btnSub,
telebot.Btn{
Text: "🔍 More >",
},
),
kbd.Row(btnPub, btnPubs),
kbd.Row(btnSub, btnSubs),
)
return
}

0 comments on commit 4502ea3

Please sign in to comment.