modify
This commit is contained in:
@@ -200,7 +200,13 @@ 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 () {
|
||||||
|
fire('CONSOLE_END');
|
||||||
|
});
|
||||||
|
if (str_contains((string)$result, 'Event::rshutdown(): Event::wait()')) {
|
||||||
|
return (string)$result;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($result)) {
|
if (empty($result)) {
|
||||||
$string .= 'success!' . PHP_EOL . PHP_EOL;
|
$string .= 'success!' . PHP_EOL . PHP_EOL;
|
||||||
} else {
|
} else {
|
||||||
@@ -208,10 +214,6 @@ class Response extends HttpService
|
|||||||
}
|
}
|
||||||
$string .= 'Command End!' . PHP_EOL . PHP_EOL;
|
$string .= 'Command End!' . PHP_EOL . PHP_EOL;
|
||||||
print_r($string);
|
print_r($string);
|
||||||
}
|
|
||||||
|
|
||||||
$event = Snowflake::app()->getEvent();
|
|
||||||
$event->trigger('CONSOLE_END');
|
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user