Documentation ¶
Index ¶
- type Button
- type ButtonRow
- type InlineButton
- type InlineButtonRow
- type InlineKeyboard
- type Keyboard
- func (k *Keyboard) AddButton(button Button)
- func (k *Keyboard) AddButtonRow(buttonRow ButtonRow)
- func (k *Keyboard) AddButtonToLastRow(button Button)
- func (k *Keyboard) AddButtonToRow(button Button, row int)
- func (k *Keyboard) GetButtonRow(row int) ButtonRow
- func (k *Keyboard) GetKeyboard() interface{}
- func (k *Keyboard) NewButton(button Button) *Keyboard
- func (k *Keyboard) NewButtonRow() *ButtonRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button struct { Text string // text shown on the button Description string // description of the button function Button tgbotapi.KeyboardButton // button itself }
Button represents a button on a keyboard.
type ButtonRow ¶
type ButtonRow struct {
Keyboard []Button
}
ButtonRow represents a row of buttons on a keyboard.
func NewButtonRow ¶
type InlineButton ¶
type InlineButton struct { Action interface{} Button tgbotapi.InlineKeyboardButton Description string Text string }
InlineButton represents a button on a inline keyboard.
func NewInlineButton ¶
func NewInlineButton(text, description string, url ...string) InlineButton
NewInlineButton returns a new InlineButton.
type InlineButtonRow ¶
type InlineButtonRow struct {
InlineKeyboard []InlineButton
}
InlineButtonRow represents a row of buttons on a inline keyboard.
func NewInlineButtonRow ¶
func NewInlineButtonRow(inlineButtons ...InlineButton) InlineButtonRow
NewInlineButtonRow returns a new InlineButtonRow.
func (*InlineButtonRow) GetInlineButton ¶
func (k *InlineButtonRow) GetInlineButton(index int) InlineButton
GetInlineButton adds a new InlineButtonRow.
func (*InlineButtonRow) NewInlineButton ¶
func (k *InlineButtonRow) NewInlineButton(inlineButton InlineButton) *InlineButtonRow
NewInlineButton returns a new InlineButton.
type InlineKeyboard ¶
type InlineKeyboard struct {
InlineButtonRows []InlineButtonRow
}
InlineKeyboard represents a custom inline keyboard with reply options.
func NewInlineKeyboard ¶
func NewInlineKeyboard(inlineButtonRows ...InlineButtonRow) *InlineKeyboard
NewInlineKeyboard returns a new InlineKeyboard.
func (*InlineKeyboard) GetInlineKeyboard ¶
func (k *InlineKeyboard) GetInlineKeyboard() tgbotapi.InlineKeyboardMarkup
GetInlineKeyboard adds a new InlineButtonRow.
func (*InlineKeyboard) NewInlineButton ¶
func (k *InlineKeyboard) NewInlineButton(inlineButton InlineButton) *InlineKeyboard
NewInlineButton returns a new InlineButton.
func (*InlineKeyboard) NewInlineButtonRow ¶
func (k *InlineKeyboard) NewInlineButtonRow(inlineButtons ...InlineButton) *InlineKeyboard
NewInlineButtonRow returns a new InlineButton with switch inline query.
type Keyboard ¶
type Keyboard struct {
ButtonRows []ButtonRow
}
Keyboard represents a custom keyboard with reply options.
func NewKeyboard ¶
func (*Keyboard) AddButtonRow ¶
func (*Keyboard) AddButtonToLastRow ¶
func (*Keyboard) AddButtonToRow ¶
func (*Keyboard) GetButtonRow ¶
func (*Keyboard) GetKeyboard ¶
func (k *Keyboard) GetKeyboard() interface{}