configs['log_chat'] and $error = error_get_last()) { if ($bot->configs['log_types'][$error['type']]) { $error_message = $error['message'] . PHP_EOL . 'File: ' . $bot->code($error['file']) . ' on line ' . $bot->code($error['line']); $bot->sendLog($bot->bold('[Error]' . PHP_EOL) . $error_message); } } } function shutdownHandler() { global $bot; if (isset($bot) and $bot->configs['log_chat'] and $error = error_get_last()) { if ($bot->configs['log_types'][$error['type']]) { $error_message = $error['message'] . PHP_EOL . 'File: ' . $bot->code($error['file']) . ' on line ' . $bot->code($error['line']); $bot->sendLog($bot->bold('[Shutdown]' . PHP_EOL) . $error_message); } } } ?>