Skip to content

start_pet_activity

开始宠物学习、打工或冒险。

调用

js
const result = await api.start_pet_activity(self_id, activity, option_name, friend_id, sub_event_type)

参数

参数类型必填说明
self_idnumber在线 Bot QQ 号
activitystringschool / 学习work / 打工adventure / 冒险
option_namestring活动选项中的名称;与 sub_event_type 至少传一个
friend_idnumber雇佣的好友 QQ 号,仅打工和冒险可用
sub_event_typenumberget_pet_activity_options 返回的稳定子事件类型;传入后优先按此字段选项

返回值

js
{
  success: true,
  pet_id: 'PET_ID',
  activity: 'school',
  option_name: '蹦蹦跳跳体能课',
  sub_event_type: 6101,
  story_id: '6100_xxx',
  started: true,
  hired_friend_id: '',
  hired_pet_id: '',
}

调用前必读

协议与使用指南

仅 Android
适用协议
仅 Android
使用前准备
目标 Bot 必须属于当前插件节点并处于在线状态;涉及群或好友操作时,账号还必须具备对应 QQ 权限。
选择协议
const androidApi = api.forProtocol('android') // 省略时也默认 Android

原始 action 请求只使用附件约定的 client_type: 'android' | 'linuxqq';省略时选择 Android。

建议搭配

常见失败原因

  • bot 不属于本节点
  • bot 未在线或账号状态不符合要求
  • client_type 无效或目标协议不支持该 action

注意事项

  • 省略协议选择器时默认 Android;若指定 Linux,框架会明确拒绝,不会转交同 QQ 的 Android 实例。

萌卡NT 开发文档