禁言指定成员

您所在的位置:网站首页 QQ,如何禁言 禁言指定成员

禁言指定成员

2024-01-25 14:28| 来源: 网络整理| 查看: 265

# 禁言指定成员 v2.1.0

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

该接口同样可用于解除禁言,具体使用见解除指定成员禁言。

# 使用示例 async function demo() { let { data } = await client.muteApi.muteMember(guildID, userID, options); // e.g. 禁言 100 秒 // let { data } = await client.muteApi.muteMember("xxxxxx", "xxxxxx", { seconds:"100" }); // e.g. 禁言到 2022-01-08 10:29:11 // let { data } = await client.muteApi.muteMember("xxxxxx", "xxxxxx", { timeTo:"1641608951" }); // e.g. 解除禁言 // let { data } = await client.muteApi.muteMember("xxxxxx", "xxxxxx", { timeTo:"0" }); // e.g. 解除禁言 // let { data } = await client.muteApi.muteMember("xxxxxx", "xxxxxx", { seconds:"0" }); } 123456789101112131415# 参数说明 字段名 必填 类型 描述 guildID 是 string 频道 ID userID 是 string 成员 ID options 是 MuteOptions 禁言时长控制参数 # MuteOptions 字段名 类型 描述 timeTo string 禁言到期时间戳,绝对时间戳,单位:秒(与 seconds 字段同时赋值的话,以该字段为准) seconds string 禁言多少秒(两个字段二选一,默认以 timeTo 为准) # 解除禁言

该接口同样支持解除指定成员禁言,将timeTo或seconds传值为字符串'0'即可。

# 返回说明

成功返回空对象。

# 返回示例

data:

{ } 12 在GitHub上编辑此页 (opens new window) 上次更新: 1/20/2022, 10:32:14 PM

← 禁言全员 禁言批量成员 →

贡献者🎉


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3