create
fun create(type: Int? = null, targetId: String, content: String, quote: String? = null, nonce: String? = null, tempTargetId: String? = null): SendChannelMessageApi(source)
构造 发送频道聊天消息 实例。
Parameters
type
消息类型, 不传默认为 1, 代表文本类型。 9
代表 kmarkdown 消息, 10
代表卡片消息。
targetId
目标频道 id
content
消息内容
quote
回复某条消息的 msgId
nonce
nonce, 服务端不做处理, 原样返回
tempTargetId
用户 id,如果传了,代表该消息是临时消息,该消息不会存数据库,但是会在频道内只给该用户推送临时消息。用于在频道内针对用户的操作进行单独的回应通知等。
fun create(type: Int? = null, targetId: String, content: String, quote: String? = null, nonce: String? = null, tempTargetId: String? = null, templateId: String? = null): SendChannelMessageApi(source)
构造 发送频道聊天消息 实例。
Since
4.2.0
Parameters
type
消息类型, 不传默认为 1, 代表文本类型。 9
代表 kmarkdown 消息, 10
代表卡片消息。
targetId
目标频道 id
content
消息内容
quote
回复某条消息的 msgId
nonce
nonce, 服务端不做处理, 原样返回
tempTargetId
用户 id,如果传了,代表该消息是临时消息,该消息不会存数据库,但是会在频道内只给该用户推送临时消息。 用于在频道内针对用户的操作进行单独的回应通知等。
templateId
模板 id, 如果使用了,content会作为模板消息的input。
构造 发送频道聊天消息 实例。
Parameters
type
消息类型, 不传默认为 1, 代表文本类型。 9
代表 kmarkdown 消息, 10
代表卡片消息。
targetId
目标频道 id
content
消息内容
构建 发送频道聊天消息 实例。