mirror of
https://github.com/tucnak/telebot
synced 2024-11-17 09:25:43 +00:00
Export row type
This commit is contained in:
parent
b51e06e25d
commit
ad12779174
10
options.go
10
options.go
@ -160,13 +160,15 @@ func (pt PollType) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(&aux)
|
||||
}
|
||||
|
||||
type row []Btn
|
||||
// Row represents an array of buttons, a row
|
||||
type Row []Btn
|
||||
|
||||
func (r *ReplyMarkup) Row(many ...Btn) row {
|
||||
// Row create a row of buttons
|
||||
func (r *ReplyMarkup) Row(many ...Btn) Row {
|
||||
return many
|
||||
}
|
||||
|
||||
func (r *ReplyMarkup) Inline(rows ...row) {
|
||||
func (r *ReplyMarkup) Inline(rows ...Row) {
|
||||
inlineKeys := make([][]InlineButton, 0, len(rows))
|
||||
for i, row := range rows {
|
||||
keys := make([]InlineButton, 0, len(row))
|
||||
@ -185,7 +187,7 @@ func (r *ReplyMarkup) Inline(rows ...row) {
|
||||
r.InlineKeyboard = inlineKeys
|
||||
}
|
||||
|
||||
func (r *ReplyMarkup) Reply(rows ...row) {
|
||||
func (r *ReplyMarkup) Reply(rows ...Row) {
|
||||
replyKeys := make([][]ReplyButton, 0, len(rows))
|
||||
for i, row := range rows {
|
||||
keys := make([]ReplyButton, 0, len(row))
|
||||
|
Loading…
Reference in New Issue
Block a user