helpers

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHTMLMessage

func CreateHTMLMessage(chatID int64, htmlMessage string) tgbotapi.MessageConfig

func CreateKeyboardMessage

func CreateKeyboardMessage(chatID int64, text string, keyboardOptions ...string) tgbotapi.MessageConfig

func CreateKeyboardMessageWithCommand added in v0.0.3

func CreateKeyboardMessageWithCommand(chatID int64, caption string, baseCommand string, keyboardOptions ...string) tgbotapi.MessageConfig

func CreateReplyMessage

func CreateReplyMessage(update tgbotapi.Update, text string) tgbotapi.MessageConfig

func CreateTextMessage

func CreateTextMessage(chatID int64, text string) tgbotapi.MessageConfig

CreateTextMessage creates a new message with the given chatID and text.

func GetMenuOption added in v0.0.3

func GetMenuOption(keyboardOption string) (command string, caption string, value string, isLineBreak bool)

getMenuOption -> caption:command|value

func IsValidUrl

func IsValidUrl(toTest string) bool

func UpdateToString added in v0.0.3

func UpdateToString(update tgbotapi.Update) string

Types

type BotMenuOption added in v0.0.3

type BotMenuOption struct {
	Command     string
	Caption     string
	Value       string
	IsLineBreak bool
}

func ParseBotMenuOption added in v0.0.3

func ParseBotMenuOption(option string) BotMenuOption

func (BotMenuOption) MessageValue added in v0.0.3

func (b BotMenuOption) MessageValue() string

func (BotMenuOption) String added in v0.0.3

func (b BotMenuOption) String() string

Jump to

Keyboard shortcuts

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