botkb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button interface {
	ButtonType() ButtonType
}

type ButtonType

type ButtonType int
const (
	ButtonTypeData ButtonType = iota
	ButtonTypeURL
)

type DataButton

type DataButton struct {
	Text string
	Data string
}

func (DataButton) ButtonType

func (DataButton) ButtonType() ButtonType

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 UrlButton

type UrlButton struct {
	Text string
	URL  string
}

func (UrlButton) ButtonType

func (UrlButton) ButtonType() ButtonType

Jump to

Keyboard shortcuts

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