撤回消息

撤回子频道内的消息

::: warning 注意

  • 管理员可以撤回普通成员的消息。
  • 频道主可以撤回所有人的消息。

:::

使用示例

  1. token := token.BotToken("appid", "token")
  2. api := botgo.NewOpenAPI(token).WithTimeout(3 * time.Second)
  3. ctx := context.Background()
  4. err := api.RetractMessage(ctx, channelId, msgId)
  5. if err != nil {
  6. log.Fatalln("调用 RetractMessage 接口失败, err = ", err)
  7. }

参数说明

参数 必填 类型 说明
channelId string 子频道 ID
msgId string 消息 ID
RetractMessageOption RetractMessageOption 是否隐藏提示小灰条

RetractMessageOption

选项 含义
RetractMessageOptionHidetip 撤回消息隐藏小灰条可选参数