Documentation ¶
Index ¶
- Variables
- type Chat
- type File
- type Handler
- type Message
- type PhotoSize
- type Robot
- func (r *Robot) EditMessage(ctx context.Context, chatID, messageID int, text string) (*Message, error)
- func (r *Robot) GetFile(ctx context.Context, fileID string) (*File, error)
- func (r *Robot) GetUpdates(ctx context.Context, offset int) ([]Update, error)
- func (r *Robot) SendReplyMessage(ctx context.Context, chatID, replyID int, text string) (*Message, error)
- func (r *Robot) Start(ctx context.Context)
- type Update
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoToken = errors.New("token is empty")
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { MessageID int `json:"message_id"` From User `json:"from"` Date int `json:"date"` Text *string `json:"text"` Chat *Chat `json:"chat"` MediaGroupID *string `json:"media_group_id"` Photo []PhotoSize `json:"photo"` Caption *string `json:"caption"` }
func (Message) GetMaxPhotoFileID ¶
type Robot ¶
type Robot struct {
// contains filtered or unexported fields
}
func NewRobotWithHandler ¶
NewRobotWithHandler create a telegram robot with specified handler.
func (*Robot) EditMessage ¶
func (r *Robot) EditMessage(ctx context.Context, chatID, messageID int, text string) (*Message, error)
EditMessage make an editMessageText api request.
func (*Robot) GetUpdates ¶
GetUpdates make a getUpdates api request.
Click to show internal directories.
Click to hide internal directories.