Documentation ¶
Index ¶
- type Issuer
- type Session
- func (s *Session) AnswerOnLastCallback()
- func (s *Session) DeleteLastMessage() error
- func (s *Session) GetVKFriends(id int) ([]friendship.Friend, error)
- func (s *Session) SaveState() error
- func (s *Session) SendEditText(text string, keyboard [][]telegram.InlineKeyboardButton, edit bool) error
- func (s *Session) SendInlinePhoto(text string, file string, keyboard telegram.AnyKeyboard) error
- func (s *Session) SendText(text string, keyboard ...telegram.AnyKeyboard) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Issuer ¶
type Issuer struct {
// contains filtered or unexported fields
}
func (*Issuer) Issue ¶
func (i *Issuer) Issue(telegramID int, update *telegram.Update) (s *Session, release func(), err error)
Issue creates a new session and returns it. Also, it locks the session and returns the release function. Hence, you cannot work with a session simultaneously from difference threads. When you stop using the session, you must call release().
type Session ¶
type Session struct { TelegramID int LastUpdate *telegram.Update State *tgstate.State // contains filtered or unexported fields }
func (*Session) AnswerOnLastCallback ¶
func (s *Session) AnswerOnLastCallback()
func (*Session) DeleteLastMessage ¶
func (*Session) GetVKFriends ¶
func (s *Session) GetVKFriends(id int) ([]friendship.Friend, error)
func (*Session) SendEditText ¶
func (s *Session) SendEditText(text string, keyboard [][]telegram.InlineKeyboardButton, edit bool) error
SendEditText edits the message received with a callback query. Only InlineKeyboardButton keyboard is supported.
func (*Session) SendInlinePhoto ¶
Click to show internal directories.
Click to hide internal directories.