sendGroupAnnouncement

suspend fun AbstractBot.sendGroupAnnouncement(groupUin: Long, content: String, imageSource: MediaSource?, imageFormat: ImageFormat? = null, showEditCard: Boolean = false, showTipWindow: Boolean = true, confirmRequired: Boolean = true, isPinned: Boolean = false): String(source)

发送群公告。

可选图片参数改为 MediaSource,以便与其他媒体上传接口保持一致。 若提供 imageSource,则必须同时提供 imageFormat。 当前群公告图片上传最终仍会走表单上传,因此内部会在发送前一次性读取图片内容。

Return

公告 ID

Parameters

groupUin

群号

content

公告内容

imageSource

公告图片数据源,可为 null

imageFormat

公告图片格式;当 imageSource 不为 null 时必填

showEditCard

是否显示编辑名片提示

showTipWindow

是否显示提示窗口

confirmRequired

是否需要确认

isPinned

是否置顶


suspend fun AbstractBot.sendGroupAnnouncement(groupUin: Long, content: String, imageData: ByteArray? = null, imageFormat: ImageFormat? = null, showEditCard: Boolean = false, showTipWindow: Boolean = true, confirmRequired: Boolean = true, isPinned: Boolean = false): String(source)

发送群公告

Return

公告 ID

Parameters

groupUin

群号

content

公告内容

imageData

公告图片完整字节数据,可为 null

imageFormat

公告图片格式;当 imageData 不为 null 时必填

showEditCard

是否显示编辑名片提示

showTipWindow

是否显示提示窗口

confirmRequired

是否需要确认

isPinned

是否置顶