# 发表表情表态

用于在指定子频道向某条消息发表表情表态。

# 使用示例

token := token.BotToken("appid", "token")
api := botgo.NewOpenAPI(token).WithTimeout(3 * time.Second)
ctx := context.Background()

err := api.CreateMessageReaction(ctx, channelId, msgId, dto.Emoji{
    ID:   "4",
    Type: 1,
})
if err != nil {
    log.Fatalln("调用 CreateMessageReaction 接口失败, err = ", err)
}
1
2
3
4
5
6
7
8
9
10
11

# 参数说明

字段名 必填 类型 描述
channelId string 子频道 ID
msgId string 消息 ID
Emoji Emoji emoji表情

# Emoji

字段名 必填 类型 描述
Type int 表情类型,参考EmojiType
ID string 表情 ID,参考 Emoji 列表
手机QQ扫码
开发者社区
加入官方频道开发者社区