禁言指定成员

将频道指定成员(非管理员)禁言。

使用示例

  1. token := token.BotToken("appid", "token")
  2. api := botgo.NewOpenAPI(token).WithTimeout(3 * time.Second)
  3. ctx := context.Background()
  4. err := api.MemberMute(ctx, guildId, userId, &dto.UpdateGuildMute{
  5. MuteSeconds: "60",
  6. })
  7. if err != nil {
  8. log.Fatalln("调用 MemberMute 接口失败, err = ", err)
  9. }

参数说明

字段名 必填 类型 描述
guildId string 频道 ID
userId string 用户ID
UpdateGuildMute UpdateGuildMute 禁言时长控制参数

UpdateGuildMute

字段名 类型 描述
MuteEndTimestamp string 禁言到期时间戳,绝对时间戳,单位:(与 seconds 字段同时赋值的话,以该字段为准)
MuteSeconds string 禁言多少秒(两个字段二选一,默认以 mute_end_timstamp 为准