2

I am trying to add new inline button to inlineKeyboard every time when i have new iteration in cycle but i dont khow how to do this if there any solution mb in another code without rows i will be glad

selector := &tele.ReplyMarkup{}
    for rows.Next() {
            var id int
            var comment string
            var time string
            var in_meet bool
            var user_name string
            var user_chat_id string
            var priority int
            if err := rows.Scan(&id, &comment, &user_name, &user_chat_id, &priority, &time, &in_meet); err != nil {
                log.Fatal(err)
            }
            text = time
            btn := selector.Data(text,text)
            
            var  []telebot.InlineButton
            newbutton := telebot.InlineButton(selector.Inline(tele.Btn))
            ghjk = append(ghjk, newbutton)
            selector.InlineKeyboard = append(selector.InlineKeyboard,selector.InlineKeyboard)
        }
c.Send("time",selector)
}
mo1ein
  • 535
  • 4
  • 18
Fortune
  • 31
  • 2

0 Answers0