Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button interface {
GetText() string
ButtonType() ButtonType
}
type ButtonType ¶
type ButtonType int
const ( ButtonTypeText ButtonType = iota ButtonTypeData ButtonTypeURL ButtonTypeSwitchInlineQuery ButtonTypeSwitchInlineQueryCurrentChat )
type DataButton ¶
func NewDataButton ¶ added in v0.2.1
func NewDataButton(text, data string) *DataButton
func (DataButton) ButtonType ¶
func (DataButton) ButtonType() ButtonType
func (DataButton) GetText ¶ added in v0.2.0
func (b DataButton) GetText() string
type Keyboard ¶
type Keyboard interface {
// KeyboardType defines MessageKeyboard type
KeyboardType() KeyboardType
}
Keyboard defines MessageKeyboard
type KeyboardType ¶
type KeyboardType int
KeyboardType defines MessageKeyboard type
const ( // KeyboardTypeNone for no MessageKeyboard // Used by: Telegram KeyboardTypeNone KeyboardType = iota // KeyboardTypeHide commands to hide MessageKeyboard // Used by: Telegram KeyboardTypeHide // KeyboardTypeInline for inline MessageKeyboard // Used by: Telegram KeyboardTypeInline // KeyboardTypeBottom for bottom MessageKeyboard // Used by: Telegram KeyboardTypeBottom // KeyboardTypeForceReply to force reply from a user // Used by: Telegram KeyboardTypeForceReply )
type MessageKeyboard ¶
type MessageKeyboard struct {
Buttons [][]Button
// contains filtered or unexported fields
}
func NewMessageKeyboard ¶
func NewMessageKeyboard(kbType KeyboardType, buttons ...[]Button) *MessageKeyboard
func NewOnetimeKeyboard ¶ added in v0.2.3
func NewOnetimeKeyboard(buttons ...[]Button) *MessageKeyboard
func (MessageKeyboard) IsOneTime ¶ added in v0.2.3
func (k MessageKeyboard) IsOneTime() bool
func (MessageKeyboard) KeyboardType ¶
func (k MessageKeyboard) KeyboardType() KeyboardType
type SwitchInlineQueryButton ¶ added in v0.2.0
func NewSwitchInlineQueryButton ¶ added in v0.2.1
func NewSwitchInlineQueryButton(text, query string) *SwitchInlineQueryButton
func (SwitchInlineQueryButton) ButtonType ¶ added in v0.2.0
func (SwitchInlineQueryButton) ButtonType() ButtonType
func (SwitchInlineQueryButton) GetText ¶ added in v0.2.0
func (b SwitchInlineQueryButton) GetText() string
type SwitchInlineQueryCurrentChatButton ¶ added in v0.2.0
type SwitchInlineQueryCurrentChatButton struct {
Text string `json:"text"`
Query string `json:"query"`
}
func NewSwitchInlineQueryCurrentChatButton ¶ added in v0.2.1
func NewSwitchInlineQueryCurrentChatButton(text, query string) *SwitchInlineQueryCurrentChatButton
func (SwitchInlineQueryCurrentChatButton) ButtonType ¶ added in v0.2.0
func (SwitchInlineQueryCurrentChatButton) ButtonType() ButtonType
func (SwitchInlineQueryCurrentChatButton) GetText ¶ added in v0.2.0
func (b SwitchInlineQueryCurrentChatButton) GetText() string
type TextButton ¶ added in v0.2.2
type TextButton struct {
Text string `json:"text"`
}
func NewTextButton ¶ added in v0.2.2
func NewTextButton(text string) *TextButton
func (TextButton) ButtonType ¶ added in v0.2.2
func (t TextButton) ButtonType() ButtonType
func (TextButton) GetText ¶ added in v0.2.2
func (t TextButton) GetText() string
type UrlButton ¶
func NewUrlButton ¶ added in v0.2.1
func (UrlButton) ButtonType ¶
func (UrlButton) ButtonType() ButtonType
Click to show internal directories.
Click to hide internal directories.