This commit is contained in:
as2252258@163.com
2021-04-25 01:32:30 +08:00
parent 79398df424
commit cdd28a8c43
+12 -10
View File
@@ -200,18 +200,20 @@ class Response extends HttpService
$result = Help::toString($result); $result = Help::toString($result);
$string = PHP_EOL . 'Command Result: ' . PHP_EOL . PHP_EOL; $string = PHP_EOL . 'Command Result: ' . PHP_EOL . PHP_EOL;
if (!str_contains($result, 'Event::rshutdown(): Event::wait()')) { defer(function () {
if (empty($result)) { fire('CONSOLE_END');
$string .= 'success!' . PHP_EOL . PHP_EOL; });
} else { if (str_contains((string)$result, 'Event::rshutdown(): Event::wait()')) {
$string .= $result . PHP_EOL . PHP_EOL; return (string)$result;
}
$string .= 'Command End!' . PHP_EOL . PHP_EOL;
print_r($string);
} }
$event = Snowflake::app()->getEvent(); if (empty($result)) {
$event->trigger('CONSOLE_END'); $string .= 'success!' . PHP_EOL . PHP_EOL;
} else {
$string .= $result . PHP_EOL . PHP_EOL;
}
$string .= 'Command End!' . PHP_EOL . PHP_EOL;
print_r($string);
return $result; return $result;
} }