mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
add plugin loader support
This commit is contained in:
@@ -24,10 +24,10 @@ $app->enablePlugins([
|
||||
'd',
|
||||
]);
|
||||
// BotCommand 事件构造
|
||||
$cmd = \ZM\Annotation\OneBot\BotCommand::make('test')->withMethod(function () {
|
||||
$cmd = BotCommand::make('test')->on(function () {
|
||||
ctx()->reply('test ok');
|
||||
});
|
||||
$event = \ZM\Annotation\OneBot\BotEvent::make('message')->withMethod(function () {
|
||||
$event = BotEvent::make(type: 'message')->on(function () {
|
||||
});
|
||||
$app->addBotEvent($event);
|
||||
$app->addBotCommand($cmd);
|
||||
|
||||
Reference in New Issue
Block a user