Download the PHP package zhamao/go-cqhttp-adapter-plugin without Composer

On this page you can find all versions of the php package zhamao/go-cqhttp-adapter-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package go-cqhttp-adapter-plugin

go-cqhttp-adapter-plugin

炸毛框架用于接入 go-cqhttp(OneBot 11)的适配器插件。

功能

该插件将 gocq 的反向 WebSocket 接入信息全部转换为 OneBot 12 标准,安装该插件后几乎无需修改任何代码即可接入。

如果你想在其他项目上使用,也可以单独使用内部的 Converter 相关类进行转换。

安装

转换注意事项

由于 OneBot 11 和 OneBot 12 有较多差异,而这些差异也导致两者不能无损相互转换。 例如 OneBot 11 中未规定要求文件分片上传和下载的动作,那么在使用本插件时也无法使用这些动作。

由于 OneBot 11 的实现较多,而且和 OneBot 11 本身相差较大,该插件也时重点针对 go-cqhttp 进行适配转换,这也是插件不叫 onebot-11-adapter 的原因。

本插件下方列举的事件转换规则仅为自身的一些转换细节处理方案,不代表 OneBot 11 和 OneBot 12 的事件定义。 但是本插件的转换规则也是 OneBot 11 和 OneBot 12 事件定义的一个参考,如果你想了解 OneBot 11 和 12 的差异,也可以阅读下方的转换规则。

事件转换规则(11 转 12)

下面是 post_type 转换规则:

下面是 XXX_type 转换规则:

下面是 self_id 转换规则:

下面是 user_idgroup_idguild_idchannel_idmessage_id 转换规则:

下面是其他字段的一些转换规则:

下面是消息事件(message)的一些转换规则:

下面是通知事件(notice)的一些转换规则:

go-cqhttp 的 notice_type OneBot 12 的 detail_type 描述
friend_recall private_message_delete 撤回一条私聊消息
friend_add friend_increase 添加好友的通知事件
group_increase group_member_increase 群成员增加
group_decrease group_member_decrease 群成员减少
group_recall group_message_delete 群消息撤回
除上述外的其他通知事件 qq. 前缀加上原名称

下面是请求事件(request)的一些转换规则:

下面是元事件(meta)的一些转换规则:

动作转换规则(12 转 11)

动作响应转换规则(11 转 12)

动作响应的转换在插件内部对动作请求做了缓存,通过 echo 字段进行匹配,从而确定响应对应的动作请求。

其他不兼容项

转换器不支持转换以下 OneBot 12 动作到 OneBot 11 API:


All versions of go-cqhttp-adapter-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ~8.0 || ~8.1 || ~8.2 || ~8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zhamao/go-cqhttp-adapter-plugin contains the following files

Loading the files please wait ....