telegram

package
v0.0.0-...-54244c9 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLibrary

func InitLibrary(fn func() Menu)

InitLibrary should be called before calling update

func Update

func Update(update tgbotapi.Update) ([]tgbotapi.MessageConfig, error)

Update handle updates from telegram

Types

type Menu interface {
	Reset() Response
	Process(message string) Response
}

Menu is the menu to handle the all menus in bot

type Response

type Response interface {
	SetText(string)
	// contains filtered or unexported methods
}

Response is a telegram response

func NewButtonResponse

func NewButtonResponse(text string, items ...string) Response

NewButtonResponse create new button list

func NewTextResponse

func NewTextResponse(text string, hideButton bool) Response

NewTextResponse create a new text message

Jump to

Keyboard shortcuts

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