Download the PHP package onebot/libonebot without Composer

On this page you can find all versions of the php package onebot/libonebot. 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 libonebot

Version GitHub Workflow Status License Packagist PHP Version Support

php-libonebot

PHP 的 LibOneBot 库。LibOneBot 可以帮助 OneBot 实现者快速在新的聊天机器人平台实现 OneBot v12 接口标准。

基于 LibOneBot 实现 OneBot 时,OneBot 实现者只需专注于编写与聊天机器人平台对接的逻辑,包括通过长轮询或 webhook 方式从机器人平台获得事件,并将其转换为 OneBot 事件,以及处理 OneBot 动作请求,并将其转换为对机器人平台 API 的调用。

此外,内部的通信方式有相应的抽象方法,你可以在 libob 的基础上开发或整合其他 Web 框架。

当前版本还在开发中,在发布正式版之前此库内的接口可能会发生较大变动。

开发进度见 更新日志。

使用

尝试 Demo

在 require 下载 libob 库后,新建文件 demo.phpdemo.json,并在 demo.php 中写如下代码:

demo.json 中写如下代码:

此 Demo 以一个命令行交互的方式使用 LibOneBot 快速完成了一个 OneBot 实现,命令行中输入内容即可发送到 OneBot,使用 HTTP 或 WebSocket 发送给 LibOneBot 后可以将信息显示在终端内。

启动后可以利用 Postman 或 Curl 等工具发起请求,以 OneVot V12 协议的发送消息动作为例:

你应该可以看到 OneBot 命令行中出现以下消息:

并收到以下响应:


All versions of libonebot with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3 || ^8.4
ext-json Version *
psr/cache Version ^1.0 || ^3.0
psr/event-dispatcher Version ^1.0
psr/http-client Version ^1.0
psr/log Version ^1.1 || ^3.0
rybakit/msgpack Version ^0.9.0
choir/psr-http Version ^1.0
workerman/workerman Version ^4.0
zhamao/logger Version ^1.0
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 onebot/libonebot contains the following files

Loading the files please wait ....