mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-07 00:35:36 +08:00
13 KiB
13 KiB
ZM\API\OneBotV11
get
public function get(mixed $robot_id): ZMRobot
描述
作者很懒,什么也没有说
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| robot_id | mixed |
返回
| 类型 | 描述 |
|---|---|
| ZMRobot |
getRandom
public function getRandom(): ZMRobot
描述
作者很懒,什么也没有说
返回
| 类型 | 描述 |
|---|---|
| ZMRobot |
getAllRobot
public function getAllRobot(): ZMRobot[]
描述
作者很懒,什么也没有说
返回
| 类型 | 描述 |
|---|---|
| ZMRobot[] |
sendPrivateMsg
public function sendPrivateMsg(mixed $user_id, mixed $message, bool $auto_escape): null|array|bool
描述
发送私聊消息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| user_id | mixed | |
| message | mixed | |
| auto_escape | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
sendGroupMsg
public function sendGroupMsg(mixed $group_id, mixed $message, bool $auto_escape): null|array|bool
描述
发送群消息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| message | mixed | |
| auto_escape | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
sendMsg
public function sendMsg(mixed $message_type, mixed $target_id, mixed $message, bool $auto_escape): null|array|bool
描述
发送消息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| message_type | mixed | |
| target_id | mixed | |
| message | mixed | |
| auto_escape | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
deleteMsg
public function deleteMsg(mixed $message_id): null|array|bool
描述
撤回消息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| message_id | mixed |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getMsg
public function getMsg(mixed $message_id): null|array|bool
描述
获取消息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| message_id | mixed |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getForwardMsg
public function getForwardMsg(mixed $id): null|array|bool
描述
获取合并转发消息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| id | mixed |
返回
| 类型 | 描述 |
|---|---|
| null | array |
sendLike
public function sendLike(mixed $user_id, int $times): null|array|bool
描述
发送好友赞
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| user_id | mixed | |
| times | int |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupKick
public function setGroupKick(mixed $group_id, mixed $user_id, bool $reject_add_request): null|array|bool
描述
群组踢人
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| user_id | mixed | |
| reject_add_request | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupBan
public function setGroupBan(mixed $group_id, mixed $user_id, int $duration): null|array|bool
描述
群组单人禁言
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| user_id | mixed | |
| duration | int |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupAnonymousBan
public function setGroupAnonymousBan(mixed $group_id, mixed $anonymous_or_flag, int $duration): null|array|bool
描述
群组匿名用户禁言
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| anonymous_or_flag | mixed | |
| duration | int |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupWholeBan
public function setGroupWholeBan(mixed $group_id, bool $enable): null|array|bool
描述
群组全员禁言
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| enable | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupAdmin
public function setGroupAdmin(mixed $group_id, mixed $user_id, bool $enable): null|array|bool
描述
群组设置管理员
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| user_id | mixed | |
| enable | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupAnonymous
public function setGroupAnonymous(mixed $group_id, bool $enable): null|array|bool
描述
群组匿名
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| enable | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupCard
public function setGroupCard(mixed $group_id, mixed $user_id, string $card): null|array|bool
描述
设置群名片(群备注)
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| user_id | mixed | |
| card | string |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupName
public function setGroupName(mixed $group_id, mixed $group_name): null|array|bool
描述
设置群名
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| group_name | mixed |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupLeave
public function setGroupLeave(mixed $group_id, bool $is_dismiss): null|array|bool
描述
退出群组
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| is_dismiss | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupSpecialTitle
public function setGroupSpecialTitle(mixed $group_id, mixed $user_id, string $special_title, int $duration): null|array|bool
描述
设置群组专属头衔
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| user_id | mixed | |
| special_title | string | |
| duration | int |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setFriendAddRequest
public function setFriendAddRequest(mixed $flag, bool $approve, string $remark): null|array|bool
描述
处理加好友请求
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| flag | mixed | |
| approve | bool | |
| remark | string |
返回
| 类型 | 描述 |
|---|---|
| null | array |
setGroupAddRequest
public function setGroupAddRequest(mixed $flag, mixed $sub_type, bool $approve, string $reason): null|array|bool
描述
处理加群请求/邀请
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| flag | mixed | |
| sub_type | mixed | |
| approve | bool | |
| reason | string |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getLoginInfo
public function getLoginInfo(): null|array|bool
描述
获取登录号信息
返回
| 类型 | 描述 |
|---|---|
| null | array |
getStrangerInfo
public function getStrangerInfo(mixed $user_id, bool $no_cache): null|array|bool
描述
获取陌生人信息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| user_id | mixed | |
| no_cache | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getFriendList
public function getFriendList(): null|array|bool
描述
获取好友列表
返回
| 类型 | 描述 |
|---|---|
| null | array |
getGroupInfo
public function getGroupInfo(mixed $group_id, bool $no_cache): null|array|bool
描述
获取群信息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| no_cache | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getGroupList
public function getGroupList(): null|array|bool
描述
获取群列表
返回
| 类型 | 描述 |
|---|---|
| null | array |
getGroupMemberInfo
public function getGroupMemberInfo(mixed $group_id, mixed $user_id, bool $no_cache): null|array|bool
描述
获取群成员信息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| user_id | mixed | |
| no_cache | bool |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getGroupMemberList
public function getGroupMemberList(mixed $group_id): null|array|bool
描述
获取群成员列表
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getGroupHonorInfo
public function getGroupHonorInfo(mixed $group_id, mixed $type): null|array|bool
描述
获取群荣誉信息
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| group_id | mixed | |
| type | mixed |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getCsrfToken
public function getCsrfToken(): null|array|bool
描述
获取 CSRF Token
返回
| 类型 | 描述 |
|---|---|
| null | array |
getCredentials
public function getCredentials(string $domain): null|array|bool
描述
获取 QQ 相关接口凭证
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| domain | string |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getRecord
public function getRecord(mixed $file, mixed $out_format): null|array|bool
描述
获取语音
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| file | mixed | |
| out_format | mixed |
返回
| 类型 | 描述 |
|---|---|
| null | array |
getImage
public function getImage(mixed $file): null|array|bool
描述
获取图片
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| file | mixed |
返回
| 类型 | 描述 |
|---|---|
| null | array |
canSendImage
public function canSendImage(): null|array|bool
描述
检查是否可以发送图片
返回
| 类型 | 描述 |
|---|---|
| null | array |
canSendRecord
public function canSendRecord(): null|array|bool
描述
检查是否可以发送语音
返回
| 类型 | 描述 |
|---|---|
| null | array |
getStatus
public function getStatus(): null|array|bool
描述
获取运行状态
返回
| 类型 | 描述 |
|---|---|
| null | array |
getVersionInfo
public function getVersionInfo(): null|array|bool
描述
获取版本信息
返回
| 类型 | 描述 |
|---|---|
| null | array |
setRestart
public function setRestart(int $delay): null|array|bool
描述
重启 OneBot 实现
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| delay | int |
返回
| 类型 | 描述 |
|---|---|
| null | array |
cleanCache
public function cleanCache(): null|array|bool
描述
清理缓存
返回
| 类型 | 描述 |
|---|---|
| null | array |
getExtendedAPI
public function getExtendedAPI(string $package_name): mixed
描述
获取内置支持的扩展API对象 现支持 go-cqhttp 的扩展API
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| package_name | string |
返回
| 类型 | 描述 |
|---|---|
| mixed |
processAPI
public function processAPI(mixed $connection, mixed $reply, |null $function): array|bool
描述
作者很懒,什么也没有说
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| connection | mixed | |
| reply | mixed | |
| function | null |
返回
| 类型 | 描述 |
|---|---|
| array | bool |
processHttpAPI
public function processHttpAPI(mixed $connection, mixed $reply, null $function): bool
描述
作者很懒,什么也没有说
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| connection | mixed | |
| reply | mixed | |
| function | null |
返回
| 类型 | 描述 |
|---|---|
| bool |