Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RobotAdapter ¶
func NewBot ¶
func NewBot(token string) (RobotAdapter, error)
type TelegramMessageReq ¶
type TelegramPrivateMessageStruct ¶
type TelegramPrivateMessageStruct struct { MessageID int `json:"message_id"` From struct { ID int `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` Username string `json:"username"` LanguageCode string `json:"language_code"` } `json:"from"` Chat struct { ID int `json:"id"` FirstName string `json:"first_name"` Username string `json:"username"` Type string `json:"type"` } `json:"chat"` Date int `json:"date"` Text string `json:"text"` Entities []struct { Offset int `json:"offset"` Length int `json:"length"` Type string `json:"type"` } `json:"entities"` }
func ReadTgbotPrivateMsgs ¶
func ReadTgbotPrivateMsgs(botToken string) (msgs []TelegramPrivateMessageStruct, err error)
Read msgs sent to the bot. Msgs sent by the bot and msgs from group will not be included.
Click to show internal directories.
Click to hide internal directories.