功能类
设置好友消息免打扰
set_friend_msg_notify:开启或取消好友消息免打扰。
const SetFriendMsgNotifyResult *set_friend_msg_notify(
uint64_t self_id, const char *platform, uint64_t user_id, bool is_no_disturb);
void free_set_friend_msg_notify_result(const SetFriendMsgNotifyResult *result);- 权限:
set_friend_msg_notify - 调用要求:需要账号在线,请在工作线程中调用
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
self_id | uint64_t | 是 | 在线 Bot QQ 号 |
platform | const char * | 是 | 所属平台 PLATFORM_* |
user_id | uint64_t | 是 | 好友 QQ 号;尚未取得该好友信息时先调用 list_friends |
is_no_disturb | bool | 是 | true 开启免打扰,false 取消 |
返回值 SetFriendMsgNotifyResult
用完必须调用 free_set_friend_msg_notify_result(result) 交还。
| 字段 | 类型 | 说明 |
|---|---|---|
code | int32_t | 0 表示成功;服务器拒绝时原样保留服务端结果码,本地失败为 RESULT_LOCAL_ERROR(-1) |
error | const char * | 失败原因,非 NULL,无内容时为 "" |