Documentation ¶
Index ¶
- Constants
- type Action
- type Button
- type Color
- type Keyboard
- func (k *Keyboard) AddCallback(label string, color Color, payload vkapi.JSONData) bool
- func (k *Keyboard) AddLocation(payload vkapi.JSONData) bool
- func (k *Keyboard) AddOpenApp(appID, ownerID int, hash string) bool
- func (k *Keyboard) AddOpenLink(label string, link string) bool
- func (k *Keyboard) AddText(label string, color Color, payload vkapi.JSONData) bool
- func (k *Keyboard) AddVkPay(hash string) bool
- func (k *Keyboard) Data() vkapi.JSONData
- func (k *Keyboard) NextRow() bool
Constants ¶
View Source
const ( MaxButtonsOnLine = 5 MaxDefaultLines = 10 MaxInlineLines = 6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Type string `json:"type"` Payload vkapi.JSONData `json:"payload,omitempty"` Label string `json:"label,omitempty"` Link string `json:"link,omitempty"` Hash string `json:"hash,omitempty"` AppID int `json:"app_id,omitempty"` OwnerID int `json:"owner_id,omitempty"` }
Action type.
type Keyboard ¶
type Keyboard struct { Buttons [][]Button `json:"buttons"` OneTime bool `json:"one_time"` Inline bool `json:"inline"` }
Keyboard struct.
func (*Keyboard) AddCallback ¶
AddCallback adds a callback text button to the last row.
func (*Keyboard) AddLocation ¶
AddLocation adds a location button to the last row.
func (*Keyboard) AddOpenApp ¶
AddOpenApp adds a button with link to the vkapp to the last row.
func (*Keyboard) AddOpenLink ¶
AddOpenLink adds a button with external link to the last row.
Click to show internal directories.
Click to hide internal directories.