跳转到正文
功能类

设置好友备注

set_friend_remark:设置或清除好友备注。

const SetFriendRemarkResult *set_friend_remark(
    uint64_t self_id, const char *platform, uint64_t user_id, const char *remark);
void free_set_friend_remark_result(const SetFriendRemarkResult *result);
  • 权限:set_friend_remark
  • 调用要求:需要账号在线,请在工作线程中调用

参数

参数类型必填说明
self_iduint64_t是在线 Bot QQ 号
platformconst char *是所属平台 PLATFORM_*
user_iduint64_t是好友 QQ 号;尚未取得该好友信息时先调用 list_friends
remarkconst char *否UTF-8 新备注,传 "" 或 NULL 清除备注

返回值 SetFriendRemarkResult

可通过 remark_changed 事件获知备注更新。用完必须调用 free_set_friend_remark_result(result) 交还。

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

本页目录