Documentation ¶
Index ¶
Constants ¶
View Source
const ( IncomingMessage = "message_new" OutcomingMessage = "message_reply" JoinGroup = "group_join" LeaveGroup = "group_leave" )
Constant values for type of message.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotAPI ¶
type BotAPI struct { Token string `json:"token"` Buffer int `json:"buffer"` GroupID int `json:"-"` Secret string `json:"-"` Confirmation string `json:"-"` Client *http.Client `json:"-"` }
BotAPI contains information for using API.
func (*BotAPI) ListenForWebhook ¶
ListenForWebhook registers a http handler for a webhook.
type Error ¶
type Error struct { ErrorCode int `json:"error_code"` ErrorMsg string `json:"error_msg"` RequestParams []interface{} `json:"request_params"` }
Error is type for possibly error.
type Packet ¶
type Packet struct { Type string `json:"type"` Payload Payload `json:"object"` GroupID int `json:"group_id"` Secret string `json:"secret"` }
Packet is type for incoming message.
type Payload ¶
type Payload struct { ID int `json:"id"` Date int64 `json:"date"` Out int `json:"out"` UserID int `json:"user_id"` ReadState int `json:"read_state"` Title string `json:"title"` Body string `json:"body"` JoinType int `json:"join_type"` Self int `json:"self"` }
Payload is type for payload of incoming message.
Click to show internal directories.
Click to hide internal directories.