private function deleteapostar($endpoint, $request) { $apostarCMDDAO = new ApostarCMDDAO(); $result = $apostarCMDDAO->delete($request->get_chat_id()); $text = ''; if ($result) { $text = 'Borrando con exito'; } else { $text = 'Error al borrar'; } $response = new Response($endpoint, $request->get_chat_id(), Response::TYPE_TEXT); $response->text = $text; return $response; }