Documentation ¶
Index ¶
- Variables
- type Callback
- type List
- func (l *List) Build(lang string) *List
- func (l *List) GetBot() *tb.Bot
- func (l *List) GetId() string
- func (l *List) GetMarkup(lang string) *tb.ReplyMarkup
- func (l *List) GetSession(of tb.Recipient) (string, bool)
- func (l *List) Start(to tb.Recipient, textPath, language string) error
- func (l *List) StartWithText(to tb.Recipient, text, language string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidTextPath = errors.New("invalid paths") ErrInvalidLanguage = errors.New("locale does not exist") )
Functions ¶
This section is empty.
Types ¶
type Callback ¶
Callback that triggers when a user sends an item from the list if the function returns true - the user is being evicted from the active sessions
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is a set of prepared replies in a selected language that is able to perform a callback when a user selects an answer from the list
func NewListFlow ¶
func NewListFlow(id string, textEngine *tr.Engine, bot *tb.Bot, callback Callback, textPaths ...string) (*List, error)
Creates a new list
func (*List) GetMarkup ¶
func (l *List) GetMarkup(lang string) *tb.ReplyMarkup
Gets a built markup in a specified language
func (*List) GetSession ¶
Retrieves a session language by recipient
Click to show internal directories.
Click to hide internal directories.