rename Instant to ZM

This commit is contained in:
crazywhalecc 2022-12-18 00:15:34 +08:00
parent 1173949bba
commit 8c6aba9361
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
$plugin = new InstantPlugin(__DIR__); $plugin = new ZMPlugin(__DIR__);
/* /*
* 发送 "测试 123",回复 "你好123" * 发送 "测试 123",回复 "你好123"

View File

@ -7,7 +7,7 @@ use OneBot\Driver\Event\Http\HttpRequestEvent;
require 'vendor/autoload.php'; require 'vendor/autoload.php';
// 创建框架 App // 创建框架 App
$app = new ZM\InstantApplication(); $app = new ZM\ZMApplication();
// 传入自定义配置文件 // 传入自定义配置文件
$app->patchConfig([ $app->patchConfig([
'driver' => 'workerman', 'driver' => 'workerman',
@ -32,7 +32,7 @@ $event = \ZM\Annotation\OneBot\BotEvent::make('message')->withMethod(function ()
$app->addBotEvent($event); $app->addBotEvent($event);
$app->addBotCommand($cmd); $app->addBotCommand($cmd);
$app->registerEvent(HttpRequestEvent::getName(), function (HttpRequestEvent $event) { $app->addEvent(HttpRequestEvent::getName(), function (HttpRequestEvent $event) {
$event->withResponse(\OneBot\Http\HttpFactory::getInstance()->createResponse(503)); $event->withResponse(\OneBot\Http\HttpFactory::getInstance()->createResponse(503));
}); });