This commit is contained in:
crazywhalecc
2023-03-11 19:52:45 +08:00
committed by Jerry
parent cb3d2ee950
commit c147c8fe22

View File

@@ -90,6 +90,10 @@ trait BotActionTrait
BotMap::$bot_coroutines[$a->echo] = $co->getCid(); BotMap::$bot_coroutines[$a->echo] = $co->getCid();
$response = $co->suspend(); $response = $co->suspend();
if ($response instanceof ActionResponse) { if ($response instanceof ActionResponse) {
$handler = new AnnotationHandler(BotAction::class);
$handler->setRuleCallback(fn (BotAction $act) => ($act->action === '' || $act->action === $action) && $act->need_response);
// container()->set(ActionResponse::class, $response);
$handler->handleAll();
return $response; return $response;
} }
return false; return false;