使用指定食物给好友宠物喂食。
调用
const result = await api.feed_friend_pet(self_id, friend_id, food, friend_pet_id)
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
self_id |
number | 是 | 在线 Bot QQ 号 |
friend_id |
number | 是 | 好友 QQ 号 |
food |
string | 是 | get_pet_food_catalog 返回的食物名称、food_id 或 resource_id |
friend_pet_id |
string | 否 | 已缓存的好友宠物 ID;传入后跳过受客户端版本限制的好友资料解析 |
不传 friend_pet_id 时保持原行为:框架先从宠物好友池或好友资料接口解析真实宠物 ID。已有本地好友宠物缓存时,建议同时传 friend_id 与 friend_pet_id。
返回值
{
success: true,
friend_id: '123456789',
pet_id: 'PET_ID',
pet_name: '好友宠物',
food_name: '饼干',
food_id: '1',
message: '',
}