Example #1
0
 private function insultar($endpoint, $request)
 {
     $text = 'Función no implementada. ';
     if ($request->get_from_id() != null) {
         if ($request->get_from_id() == ID_PACO) {
             $text = $text . '¡¡¡Pacooooooooooooooooooo!!! ';
         } else {
             $humano = Utils::get_humano_name($request->get_from_id());
             $insulto = Utils::aleatorio(['Maldito', 'Jodido', 'Estúpido', 'Condenado', 'Retrasado', 'Podemita']);
             $text = $text . $insulto . ' ' . $humano . '. ';
         }
     }
     $insulto = Utils::getInsultoSingular();
     $text .= $insulto;
     if ($humano == 'Ario') {
         $file_id = 'AgADBAADLKkxG4jtnAABsbSkFxkCLImgn2kwAARwTik8oQSyGj3nAQABAg';
         $response = Response::create_photo_response($endpoint, $request->get_chat_id(), $file_id);
         $response->send();
     }
     return Response::create_text_response($endpoint, $request->get_chat_id(), $text);
 }