message

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File_

type File_ struct {
	MediaId string `json:"media_id"` // 文件id,通过下文的文件上传接口获取
}

File_ file类型

type Markdown_

type Markdown_ struct {
	Content string `json:"content"` // markdown内容,最长不超过4096个字节,必须是utf8编码
}

Markdown_ markdown类型

type Message

type Message struct {
	MsgType  MsgType_  `json:"msgtype"`
	Text     Text_     `json:"text"`
	Markdown Markdown_ `json:"markdown"`
	News     News_     `json:"link"`
	File     File_     `json:"file"`
}

type MsgType_

type MsgType_ string
const (
	TextStr     MsgType_ = "text"
	NewsStr     MsgType_ = "news"
	MarkdownStr MsgType_ = "markdown"
)

type News_

type News_ struct {
	Articles []articles `json:"articles"` // 图文消息,一个图文消息支持1到8条图文
}

News_ news类型

type Text_

type Text_ struct {
	Content             string   `json:"content"`               // 文本内容,最长不超过2048个字节,必须是utf8编码
	MentionedList       []string `json:"mentioned_list"`        // userid的列表,提醒群中的指定成员(@某个成员),@all表示提醒所有人,如果开发者获取不到userid,可以使用mentioned_mobile_list
	MentionedMobileList []string `json:"mentioned_mobile_list"` // 手机号列表,提醒手机号对应的群成员(@某个成员),@all表示提醒所有人
}

Text_ text类型

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL