跳转到正文
功能类

屏蔽 / 解除屏蔽好友

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_iduint64_t是在线 Bot QQ 号
platformconst char *是所属平台 PLATFORM_*
user_iduint64_t是好友 QQ 号
is_blockedbool是true 屏蔽,false 解除屏蔽

返回值 SetFriendBlockResult

用完必须调用 free_set_friend_block_result(result) 交还。

字段类型说明
codeint32_t0 表示成功;服务器拒绝时原样保留服务端结果码,本地失败为 RESULT_LOCAL_ERROR(-1)
errorconst char *失败原因,非 NULL,无内容时为 ""

本页目录