botkb

package
v0.66.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 (
	ButtonTypeData ButtonType = iota
	ButtonTypeURL
	ButtonTypeSwitchInlineQuery
	ButtonTypeSwitchInlineQueryCurrentChat
)

type DataButton

type DataButton struct {
	Text string
	Data string
}

func NewDataButton

func NewDataButton(text, data string) *DataButton

func (DataButton) ButtonType

func (DataButton) ButtonType() ButtonType

func (DataButton) GetText

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 (MessageKeyboard) KeyboardType

func (k MessageKeyboard) KeyboardType() KeyboardType

type SwitchInlineQueryButton

type SwitchInlineQueryButton struct {
	Text  string
	Query string
}

func NewSwitchInlineQueryButton

func NewSwitchInlineQueryButton(text, query string) *SwitchInlineQueryButton

func (SwitchInlineQueryButton) ButtonType

func (SwitchInlineQueryButton) ButtonType() ButtonType

func (SwitchInlineQueryButton) GetText

func (b SwitchInlineQueryButton) GetText() string

type SwitchInlineQueryCurrentChatButton

type SwitchInlineQueryCurrentChatButton struct {
	Text  string
	Query string
}

func NewSwitchInlineQueryCurrentChatButton

func NewSwitchInlineQueryCurrentChatButton(text, query string) *SwitchInlineQueryCurrentChatButton

func (SwitchInlineQueryCurrentChatButton) ButtonType

func (SwitchInlineQueryCurrentChatButton) GetText

type UrlButton

type UrlButton struct {
	Text string
	URL  string
}

func NewUrlButton

func NewUrlButton(text, url string) *UrlButton

func (UrlButton) ButtonType

func (UrlButton) ButtonType() ButtonType

func (UrlButton) GetText

func (b UrlButton) GetText() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL