获取精华消息

用于获取子频道 channelId 内的精华消息。

使用示例

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

参数说明

字段名 必填 类型 描述
channelId string 子频道 ID

返回说明

返回 PinsMessage 对象。

PinsMessage

字段名 类型 描述
GuildID string 频道 ID
ChannelID string 子频道 ID
MessageIDs string[] 消息 ID

返回示例

data

  1. {
  2. "guild_id": "xxxxxx",
  3. "channel_id": "xxxxxx",
  4. "message_ids": ["xxxxx"]
  5. }