功能类
屏蔽 / 解除屏蔽好友
set_friend_block:设置或解除对好友的屏蔽状态。
const SetFriendBlockResult *set_friend_block(
uint64_t self_id, const char *platform, uint64_t user_id, bool is_blocked);
void free_set_friend_block_result(const SetFriendBlockResult *result);- 权限:
set_friend_block - 调用要求:需要账号在线,请在工作线程中调用
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
self_id | uint64_t | 是 | 在线 Bot QQ 号 |
platform | const char * | 是 | 所属平台 PLATFORM_* |
user_id | uint64_t | 是 | 好友 QQ 号 |
is_blocked | bool | 是 | true 屏蔽,false 解除屏蔽 |
返回值 SetFriendBlockResult
用完必须调用 free_set_friend_block_result(result) 交还。
| 字段 | 类型 | 说明 |
|---|---|---|
code | int32_t | 0 表示成功;服务器拒绝时原样保留服务端结果码,本地失败为 RESULT_LOCAL_ERROR(-1) |
error | const char * | 失败原因,非 NULL,无内容时为 "" |