{"id":388893,"date":"2024-06-29T08:14:44","date_gmt":"2024-06-29T08:14:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=388893"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=388893","title":{"rendered":"<span>\u0413\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u0430\u043a \u0411\u0414 \u0434\u043b\u044f \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0431\u043e\u0442\u0430 (\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/habr.com\/en\/post\/722952\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0438 <\/a>\u043f\u0440\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0434. <\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435: \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 \u044f\u0447\u0435\u0435\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0447\u0430\u0442 \u0441 \u0431\u043e\u0442\u043e\u043c.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u043e\u0431\u0435\u0449\u0430\u043b\u0430, \u0432 \u043d\u043e\u0432\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u044f\u0447\u0435\u0435\u043a \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0438\u0445 \u0432 \u043a\u043d\u043e\u043f\u043a\u0438, \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0432 \u0438\u0445 \u043f\u043e\u0434 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e.<\/p>\n<h2>\u042f\u0447\u0435\u0439\u043a\u0438 \u0433\u0442 \u0432 \u043a\u043d\u043e\u043f\u043a\u0438 \u0442\u0433 &#8212; \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0430\u0442 \u043a\u043d\u043e\u043f\u043a\u0438 (\u043a \u0442\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u043a\u043d\u043e\u043f\u043e\u043a).  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a71\/b54\/98b\/a71b5498bd746f6d09894f525fcc86f8.png\" alt=\"\u0422\u0430\u0431\u043b\u0438\u0446\u0430 Answers\" title=\"\u0422\u0430\u0431\u043b\u0438\u0446\u0430 Answers\" width=\"845\" height=\"919\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a71\/b54\/98b\/a71b5498bd746f6d09894f525fcc86f8.png\"\/><\/p>\n<div><figcaption>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 Answers<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 Answers \u0441 \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c\u0438:\u00a0<\/p>\n<ul>\n<li>\n<p>\u0438\u0434 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0435\u043a\u0441\u0442 \u043a\u043d\u043e\u043f\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0430\u0440\u043a\u0435\u0440 \u0432\u0435\u0440\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0438 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 <em>InlineKeyboardMarkup<\/em> \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"https:\/\/core.telegram.org\/bots\/api#inlinekeyboardmarkup\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Telegram bot api<\/a>.<\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 sendQuestions(chat_id) \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430<\/p>\n<pre><code class=\"javascript\">function sendQuestions(chat_id) {   const questionsArr = questionsSheet.getRange(1,1,questionsSheet.getLastRow(), questionsSheet.getLastColumn()).getValues();    Logger.log(questionsArr)    questionsArr.forEach(e => send(e[1],chat_id)) }<\/code><\/pre>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 Answers.<\/p>\n<pre><code class=\"javascript\">const answersArr = answersSheet.getDataRange().getValues();<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043b\u0438\u0441\u0442\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u043e\u0434 .getDataRange().  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0442\u0440\u043e\u043a\u0443 <\/p>\n<pre><code class=\"javascript\">const questionsArr = questionsSheet.getRange(1,1,questionsSheet.getLastRow(), questionsSheet.getLastColumn()).getValues();<\/code><\/pre>\n<p> \u0442\u043e\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430<\/p>\n<pre><code class=\"javascript\">const questionsArr = questionsSheet.getDataRange().getValues();<\/code><\/pre>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/p>\n<pre><code class=\"javascript\">function sendQuestions(chat_id) {   const questionsArr = questionsSheet.getDataRange().getValues();   const answersArr = answersSheet.getDataRange().getValues();    Logger.log(questionsArr)   Logger.log(answersArr)    \/\/questionsArr.forEach(e => send(e[1],chat_id)) }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f \u043f\u043e\u043a\u0430 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0447\u0430\u0442\u043e\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432 \u043b\u043e\u0433\u0435\u0440\u0435 \u0434\u0432\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 &#8212; \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4e2\/b3a\/e25\/4e2b3ae255157acb67370c0da29666d9.png\" alt=\"\" title=\"\" width=\"1554\" height=\"290\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4e2\/b3a\/e25\/4e2b3ae255157acb67370c0da29666d9.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 <em>keyboard<\/em>.<\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u044f \u043e\u0431\u044a\u044f\u0432\u043b\u044e \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u043a\u0430\u0436\u0443 \u043a\u043b\u044e\u0447 <em>inline_keyboard<\/em> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 \u043a\u043d\u043e\u043f\u043e\u043a.<\/p>\n<pre><code class=\"javascript\">const keyboard = {       \"inline_keyboard\": arr }<\/code><\/pre>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>arr<\/em> &#8212; \u044d\u0442\u043e \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u043a\u043d\u043e\u043f\u043a\u0438. \u041f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c <em>arr<\/em><\/p>\n<pre><code class=\"javascript\">const arr =   [     [{\"text\":\"button1\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}],     [{\"text\":\"button2\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}]   ]<\/code><\/pre>\n<p>* \u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043e\u0434\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043a\u043e\u0434\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/p>\n<pre><code class=\"javascript\">const keyboard1 =  {   \"inline_keyboard\":     [       [{\"text\": \"buttonText1\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}],       [{\"text\": \"buttontext2\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}]     ] }  const keyboard2 =  {   \"inline_keyboard\":     [       [{\"text\": \"buttonText3\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}],       [{\"text\": \"buttontext4\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}],       [{\"text\": \"buttontext5\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}]     ] }<\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447 <em>text<\/em> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0435. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/core.telegram.org\/bots\/api#inlinekeyboardbutton\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, \u0432 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <em>callback_data<\/em>.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0435\u0449\u0435 \u0440\u0430\u0437. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e \u0438\u0434 \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 <code>questionsArr.forEach(e => send(e[1],chat_id))<\/code>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0443 \u0435\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0430\u0447\u0435  <\/p>\n<pre><code class=\"javascript\">questionsArr.forEach(e => {   \/\/send(e[1],chat_id) })<\/code><\/pre>\n<p>\u0412 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u043d\u0430\u0448 <em>arr<\/em> \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438 \u0441\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <em>keyboard<\/em><\/p>\n<pre><code class=\"javascript\">questionsArr.forEach(e => {   let arr = answersArr.filter(el => el[0] == e[0])    const keyboard = {     \"inline_keyboard\": arr   }      \/\/send(e[1],chat_id) }) <\/code><\/pre>\n<p>\u0412 \u043d\u043e\u0432\u043e\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043a\u043e\u0434\u0430 \u044f \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0432 \u043d\u0435\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e \u043f\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443, \u0447\u0442\u043e \u0438\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <em>Questions<\/em> \u0440\u0430\u0432\u043d\u043e \u0438\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <em>Answers<\/em>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u0435\u0442\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>filter()<\/em>.<\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u044f \u0441\u0441\u044b\u043b\u0430\u044e\u0441\u044c \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>answersArr <\/em>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>el<\/em>, \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>el<\/em> \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 0 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>questionsArr<\/em> \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 0.<\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0432\u0435\u0434\u0443 \u0432 \u043b\u043e\u0433\u0435\u0440\u0435<\/p>\n<pre><code class=\"javascript\">questionsArr.forEach(e => {   let arr = answersArr.filter(el => el[0] == e[0])   Logger.log(arr)    const keyboard = {     \"inline_keyboard\": arr   }      \/\/send(e[1],chat_id) })<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/61a\/7b4\/6f0\/61a7b46f0ce0179cfd1a874566b2e88a.png\" alt=\"\" title=\"\" width=\"1600\" height=\"325\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/61a\/7b4\/6f0\/61a7b46f0ce0179cfd1a874566b2e88a.png\"\/><\/figure>\n<p>*\u0422\u0430\u043a\u043e\u0439 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0446\u0438\u043a\u043b\u0430\u043c\u0438 <\/p>\n<pre><code class=\"javascript\">for (let i=0; i&lt;questionsArr.length; i++) {     let arr = new Array();     for (let j=0; j&lt;answersArr.length; j++) {       if (questionsArr[i][0] == answersArr[j][0]) arr.push(answersArr[j])      }     Logger.log(arr)   } <\/code><\/pre>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043b\u043e\u0433\u0435\u0440\u0435, \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0438\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 &#8212; 1, 2, 3 \u0438 4.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u043c .<em>map().<\/em><\/p>\n<pre><code class=\"javascript\">questionsArr.forEach(e => {   let arr = answersArr.filter(el => el[0] == e[0])   arr = arr.map(el => [{\"text\":el[1], \"callback_data\":el[1]}])   Logger.log(arr)    const keyboard = {     \"inline_keyboard\": arr   }      \/\/send(e[1],chat_id) }) <\/code><\/pre>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <em>map()<\/em> \u0441\u0441\u044b\u043b\u0430\u044e\u0441\u044c \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>arr <\/em>\u0447\u0435\u0440\u0435\u0437 <em>el<\/em>, \u0431\u0435\u0440\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 1 \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e \u0435\u0433\u043e \u043a\u043b\u044e\u0447\u0430\u043c <em>text<\/em> \u0438 <em>callback_data<\/em>. \u0422\u043e \u0435\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u00a0<span class=\"habrahidden\">[1.0, \u0414\u0436\u0435\u0439\u043a \u043f\u0435\u0441,  ]<\/span> \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 <span class=\"habrahidden\">[{&#171;text&#187;:&#187;\u0414\u0436\u0435\u0439\u043a \u043f\u0435\u0441&#187;, &#171;callback_data&#187;:&#187;\u0414\u0436\u0435\u0439\u043a \u043f\u0435\u0441&#187;}]<\/span><\/p>\n<p>\u0418 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 \u0446\u0438\u043a\u043b\u0430\u0445 \u0431\u0435\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (\u043d\u0443 \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e)<\/p>\n<pre><code class=\"javascript\">  for (let i=0; i&lt;questionsArr.length; i++) {     let arr = new Array();     for (let j=0; j&lt;answersArr.length; j++) {       if (questionsArr[i][0] == answersArr[j][0]) {         const val = answersArr[j][1]         const button = {\"text\":val, \"callback_data\":val}         arr.push([button])        }     }     Logger.log(arr)   }<\/code><\/pre>\n<p><em>*\u041c\u0435\u0442\u043e\u0434 .push() \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/em><\/p>\n<p>\u0418 \u0432\u044b\u0432\u043e\u0434 \u0432 \u043b\u043e\u0433\u0435\u0440\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>arr<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b41\/d31\/f03\/b41d31f0396c01158a1620ff8a24bdf1.png\" alt=\"\" title=\"\" width=\"1600\" height=\"332\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b41\/d31\/f03\/b41d31f0396c01158a1620ff8a24bdf1.png\"\/><\/figure>\n<p>\u0412\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>sendQuestions()<\/em> \u043d\u0438\u0436\u0435  <\/p>\n<pre><code class=\"javascript\">function sendQuestions() {   const questionsArr = questionsSheet.getDataRange().getValues();   const answersArr = answersSheet.getDataRange().getValues();    Logger.log(questionsArr)   Logger.log(answersArr)    \/\/\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 1   \/*   for (let i=0; i&lt;questionsArr.length; i++) {     let arr = new Array();     for (let j=0; j&lt;answersArr.length; j++) {       if (questionsArr[i][0] == answersArr[j][0]) {         const val = answersArr[j][1]         const button = {\"text\":val, \"callback_data\":val}         arr.push([button])        }     }     Logger.log(arr)   }   *\/   \/\/\u043a\u043e\u043d\u0435\u0446 \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b 1   \/\/\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 2     questionsArr.forEach(e => {     let arr = answersArr.filter(el => el[0] == e[0])     arr = arr.map(el => [{\"text\":el[1], \"callback_data\":el[1]}])     Logger.log(arr)   \/\/\u043a\u043e\u043d\u0435\u0446 \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b 2     const keyboard = {       \"inline_keyboard\": arr     }     \/\/send(e[1],chat_id)   })  }<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044d\u0442\u0430 \u0434\u0435\u043b\u0430\u0435\u0442. \u0412\u043d\u0435\u0441\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>send()<\/em>.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0438\u043c\u044f \u043a\u043b\u044e\u0447\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <em>reply_markup<\/em>, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>keyboard<\/em>:<\/p>\n<pre><code class=\"javascript\">'reply_markup' : JSON.stringify(keyboard)<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c <em>keyboard<\/em> \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b\u0443\u0447\u0438\u043c<\/p>\n<pre><code class=\"javascript\">function send(msg, chat_id, keyboard) {   const payload = {     'method': 'sendMessage',     'chat_id': String(chat_id),     'text': msg,     'parse_mode': 'HTML',     'reply_markup' : JSON.stringify(keyboard)   }   const data = {     'method': 'post',     'payload': payload,     'muteHttpExceptions': true   }     UrlFetchApp.fetch('https:\/\/api.telegram.org\/bot' + token + '\/', data); } <\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0434\u0435\u043f\u043b\u043e\u0438\u043c (<a href=\"https:\/\/habr.com\/en\/post\/585456\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?<\/a>). \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>api_connector()<\/em> \u0441 \u043d\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <em>appLink<\/em>  <\/p>\n<pre><code class=\"javascript\">function api_connector() {   const appLink = \"\u0412\u0430\u0448 URL\";   UrlFetchApp.fetch(\"https:\/\/api.telegram.org\/bot\"+token+\"\/setWebHook?url=\"+ appLink);  } <\/code><\/pre>\n<p>\u0418\u0434\u0435\u043c \u0432 \u0447\u0430\u0442, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438\u2026 \u0432\u0438\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442!  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1c8\/c58\/4ee\/1c8c584ee4f7df9f0b1453fef145f593.png\" alt=\"\" title=\"\" width=\"1600\" height=\"915\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1c8\/c58\/4ee\/1c8c584ee4f7df9f0b1453fef145f593.png\"\/><\/figure>\n<p>\u0411\u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442  <\/p>\n<pre><code class=\"javascript\">const doc = SpreadsheetApp.getActive(); const questionsSheet = doc.getSheetByName(\"Questions\"); const answersSheet = doc.getSheetByName(\"Answers\"); const usersSheet = doc.getSheetByName(\"Users\");  const token = \"\u0412\u0430\u0448 \u0442\u043e\u043a\u0435\u043d\"  function api_connector () {   const App_link = \"\u0412\u0430\u0448 URL\";   UrlFetchApp.fetch(\"https:\/\/api.telegram.org\/bot\"+token+\"\/setWebHook?url=\"+App_link);  }  function doPost(e) {   const update = JSON.parse(e.postData.contents);   let msgData = {}   if (update.hasOwnProperty('message')) {     msgData = {       id         : update.message.message_id,       chat_id    : update.message.chat.id,       user_name  : update.message.from.username,       text       : update.message.text,       is_msg     : true     };   }      sendQuestions(msgData.chat_id); }   function send(msg, chat_id, keyboard) {   const payload = {     'method': 'sendMessage',     'chat_id': String(chat_id),     'text': msg,     'parse_mode': 'HTML',     'reply_markup' : JSON.stringify(keyboard)   }   const data = {     'method': 'post',     'payload': payload,     'muteHttpExceptions': true   }     UrlFetchApp.fetch('https:\/\/api.telegram.org\/bot' + token + '\/', data); }  function sendQuestions(chat_id) {   const questionsArr = questionsSheet.getDataRange().getValues();   const answersArr = answersSheet.getDataRange().getValues();    Logger.log(questionsArr)   Logger.log(answersArr)    questionsArr.forEach(e => {     let arr = answersArr.filter(el => el[0] == e[0])     arr = arr.map(el => [{\"text\":el[1], \"callback_data\":el[1]}])     Logger.log(arr)      const keyboard = {       \"inline_keyboard\": arr     }      send(e[1], chat_id, keyboard)   }) }<\/code><\/pre>\n<h2>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442&#8230;<\/h2>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c, \u043a\u0430\u043a \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u043e\u0442\u0430 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0438\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043f\u0440\u043e\u0448\u043b\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0443 \u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434\u0430 \u043f\u043e\u043c\u043e\u0447\u044c \ud83d\ude42<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/725420\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0412\u044b \u0435\u0449\u0435 \u0437\u0434\u0435\u0441\u044c?.<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">75% <\/span><span class=\"tm-article-poll__answer-label\">\u2714\ufe0f \u0434\u0430, \u0434\u0430\u0432\u0430\u0439 \u0435\u0449\u0435<\/span><span class=\"tm-article-poll__answer-votes\">27<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 75%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">16.67% <\/span><span class=\"tm-article-poll__answer-label\">? \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e<\/span><span class=\"tm-article-poll__answer-votes\">6<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 16.67%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">8.33% <\/span><span class=\"tm-article-poll__answer-label\">? \u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b(\u0430)<\/span><span class=\"tm-article-poll__answer-votes\">3<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 8.33%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 36 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 4 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/725420\/\"> https:\/\/habr.com\/ru\/articles\/725420\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/habr.com\/en\/post\/722952\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0438 <\/a>\u043f\u0440\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0434. <\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435: \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 \u044f\u0447\u0435\u0435\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0447\u0430\u0442 \u0441 \u0431\u043e\u0442\u043e\u043c.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u043e\u0431\u0435\u0449\u0430\u043b\u0430, \u0432 \u043d\u043e\u0432\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u044f\u0447\u0435\u0435\u043a \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0438\u0445 \u0432 \u043a\u043d\u043e\u043f\u043a\u0438, \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0432 \u0438\u0445 \u043f\u043e\u0434 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e.<\/p>\n<h2>\u042f\u0447\u0435\u0439\u043a\u0438 \u0433\u0442 \u0432 \u043a\u043d\u043e\u043f\u043a\u0438 \u0442\u0433 &#8212; \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0430\u0442 \u043a\u043d\u043e\u043f\u043a\u0438 (\u043a \u0442\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u043a\u043d\u043e\u043f\u043e\u043a).  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 Answers<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 Answers \u0441 \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c\u0438:\u00a0<\/p>\n<ul>\n<li>\n<p>\u0438\u0434 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0435\u043a\u0441\u0442 \u043a\u043d\u043e\u043f\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0430\u0440\u043a\u0435\u0440 \u0432\u0435\u0440\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0438 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 <em>InlineKeyboardMarkup<\/em> \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"https:\/\/core.telegram.org\/bots\/api#inlinekeyboardmarkup\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Telegram bot api<\/a>.<\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 sendQuestions(chat_id) \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430<\/p>\n<pre><code class=\"javascript\">function sendQuestions(chat_id) {   const questionsArr = questionsSheet.getRange(1,1,questionsSheet.getLastRow(), questionsSheet.getLastColumn()).getValues();    Logger.log(questionsArr)    questionsArr.forEach(e => send(e[1],chat_id)) }<\/code><\/pre>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 Answers.<\/p>\n<pre><code class=\"javascript\">const answersArr = answersSheet.getDataRange().getValues();<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043b\u0438\u0441\u0442\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u043e\u0434 .getDataRange().  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0442\u0440\u043e\u043a\u0443 <\/p>\n<pre><code class=\"javascript\">const questionsArr = questionsSheet.getRange(1,1,questionsSheet.getLastRow(), questionsSheet.getLastColumn()).getValues();<\/code><\/pre>\n<p> \u0442\u043e\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430<\/p>\n<pre><code class=\"javascript\">const questionsArr = questionsSheet.getDataRange().getValues();<\/code><\/pre>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/p>\n<pre><code class=\"javascript\">function sendQuestions(chat_id) {   const questionsArr = questionsSheet.getDataRange().getValues();   const answersArr = answersSheet.getDataRange().getValues();    Logger.log(questionsArr)   Logger.log(answersArr)    \/\/questionsArr.forEach(e => send(e[1],chat_id)) }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f \u043f\u043e\u043a\u0430 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0447\u0430\u0442\u043e\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432 \u043b\u043e\u0433\u0435\u0440\u0435 \u0434\u0432\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 &#8212; \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 <em>keyboard<\/em>.<\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u044f \u043e\u0431\u044a\u044f\u0432\u043b\u044e \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u043a\u0430\u0436\u0443 \u043a\u043b\u044e\u0447 <em>inline_keyboard<\/em> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 \u043a\u043d\u043e\u043f\u043e\u043a.<\/p>\n<pre><code class=\"javascript\">const keyboard = {       \"inline_keyboard\": arr }<\/code><\/pre>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>arr<\/em> &#8212; \u044d\u0442\u043e \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u043a\u043d\u043e\u043f\u043a\u0438. \u041f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c <em>arr<\/em><\/p>\n<pre><code class=\"javascript\">const arr =   [     [{\"text\":\"button1\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}],     [{\"text\":\"button2\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}]   ]<\/code><\/pre>\n<p>* \u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043e\u0434\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043a\u043e\u0434\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/p>\n<pre><code class=\"javascript\">const keyboard1 =  {   \"inline_keyboard\":     [       [{\"text\": \"buttonText1\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}],       [{\"text\": \"buttontext2\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}]     ] }  const keyboard2 =  {   \"inline_keyboard\":     [       [{\"text\": \"buttonText3\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}],       [{\"text\": \"buttontext4\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}],       [{\"text\": \"buttontext5\", \"otherKey1\":\"value1\", \"otherKey2\":\"value2\"}]     ] }<\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447 <em>text<\/em> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0435. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/core.telegram.org\/bots\/api#inlinekeyboardbutton\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, \u0432 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <em>callback_data<\/em>.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0435\u0449\u0435 \u0440\u0430\u0437. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e \u0438\u0434 \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 <code>questionsArr.forEach(e => send(e[1],chat_id))<\/code>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0443 \u0435\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0430\u0447\u0435  <\/p>\n<pre><code class=\"javascript\">questionsArr.forEach(e => {   \/\/send(e[1],chat_id) })<\/code><\/pre>\n<p>\u0412 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u043d\u0430\u0448 <em>arr<\/em> \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438 \u0441\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <em>keyboard<\/em><\/p>\n<pre><code class=\"javascript\">questionsArr.forEach(e => {   let arr = answersArr.filter(el => el[0] == e[0])    const keyboard = {     \"inline_keyboard\": arr   }      \/\/send(e[1],chat_id) }) <\/code><\/pre>\n<p>\u0412 \u043d\u043e\u0432\u043e\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043a\u043e\u0434\u0430 \u044f \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0432 \u043d\u0435\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e \u043f\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443, \u0447\u0442\u043e \u0438\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <em>Questions<\/em> \u0440\u0430\u0432\u043d\u043e \u0438\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <em>Answers<\/em>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u0435\u0442\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>filter()<\/em>.<\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u044f \u0441\u0441\u044b\u043b\u0430\u044e\u0441\u044c \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>answersArr <\/em>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>el<\/em>, \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>el<\/em> \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 0 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>questionsArr<\/em> \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 0.<\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0432\u0435\u0434\u0443 \u0432 \u043b\u043e\u0433\u0435\u0440\u0435<\/p>\n<pre><code class=\"javascript\">questionsArr.forEach(e => {   let arr = answersArr.filter(el => el[0] == e[0])   Logger.log(arr)    const keyboard = {     \"inline_keyboard\": arr   }      \/\/send(e[1],chat_id) })<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>*\u0422\u0430\u043a\u043e\u0439 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0446\u0438\u043a\u043b\u0430\u043c\u0438 <\/p>\n<pre><code class=\"javascript\">for (let i=0; i&lt;questionsArr.length; i++) {     let arr = new Array();     for (let j=0; j&lt;answersArr.length; j++) {       if (questionsArr[i][0] == answersArr[j][0]) arr.push(answersArr[j])      }     Logger.log(arr)   } <\/code><\/pre>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043b\u043e\u0433\u0435\u0440\u0435, \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0438\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 &#8212; 1, 2, 3 \u0438 4.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u043c .<em>map().<\/em><\/p>\n<pre><code class=\"javascript\">questionsArr.forEach(e => {   let arr = answersArr.filter(el => el[0] == e[0])   arr = arr.map(el => [{\"text\":el[1], \"callback_data\":el[1]}])   Logger.log(arr)    const keyboard = {     \"inline_keyboard\": arr   }      \/\/send(e[1],chat_id) }) <\/code><\/pre>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <em>map()<\/em> \u0441\u0441\u044b\u043b\u0430\u044e\u0441\u044c \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>arr <\/em>\u0447\u0435\u0440\u0435\u0437 <em>el<\/em>, \u0431\u0435\u0440\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 1 \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e \u0435\u0433\u043e \u043a\u043b\u044e\u0447\u0430\u043c <em>text<\/em> \u0438 <em>callback_data<\/em>. \u0422\u043e \u0435\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u00a0<span class=\"habrahidden\">[1.0, \u0414\u0436\u0435\u0439\u043a \u043f\u0435\u0441,  ]<\/span> \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 <span class=\"habrahidden\">[{&#171;text&#187;:&#187;\u0414\u0436\u0435\u0439\u043a \u043f\u0435\u0441&#187;, &#171;callback_data&#187;:&#187;\u0414\u0436\u0435\u0439\u043a \u043f\u0435\u0441&#187;}]<\/span><\/p>\n<p>\u0418 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 \u0446\u0438\u043a\u043b\u0430\u0445 \u0431\u0435\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (\u043d\u0443 \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e)<\/p>\n<pre><code class=\"javascript\">  for (let i=0; i&lt;questionsArr.length; i++) {     let arr = new Array();     for (let j=0; j&lt;answersArr.length; j++) {       if (questionsArr[i][0] == answersArr[j][0]) {         const val = answersArr[j][1]         const button = {\"text\":val, \"callback_data\":val}         arr.push([button])        }     }     Logger.log(arr)   }<\/code><\/pre>\n<p><em>*\u041c\u0435\u0442\u043e\u0434 .push() \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/em><\/p>\n<p>\u0418 \u0432\u044b\u0432\u043e\u0434 \u0432 \u043b\u043e\u0433\u0435\u0440\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <em>arr<\/em><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>sendQuestions()<\/em> \u043d\u0438\u0436\u0435  <\/p>\n<pre><code class=\"javascript\">function sendQuestions() {   const questionsArr = questionsSheet.getDataRange().getValues();   const answersArr = answersSheet.getDataRange().getValues();    Logger.log(questionsArr)   Logger.log(answersArr)    \/\/\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 1   \/*   for (let i=0; i&lt;questionsArr.length; i++) {     let arr = new Array();     for (let j=0; j&lt;answersArr.length; j++) {       if (questionsArr[i][0] == answersArr[j][0]) {         const val = answersArr[j][1]         const button = {\"text\":val, \"callback_data\":val}         arr.push([button])        }     }     Logger.log(arr)   }   *\/   \/\/\u043a\u043e\u043d\u0435\u0446 \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b 1   \/\/\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 2     questionsArr.forEach(e => {     let arr = answersArr.filter(el => el[0] == e[0])     arr = arr.map(el => [{\"text\":el[1], \"callback_data\":el[1]}])     Logger.log(arr)   \/\/\u043a\u043e\u043d\u0435\u0446 \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b 2     const keyboard = {       \"inline_keyboard\": arr     }     \/\/send(e[1],chat_id)   })  }<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044d\u0442\u0430 \u0434\u0435\u043b\u0430\u0435\u0442. \u0412\u043d\u0435\u0441\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>send()<\/em>.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0438\u043c\u044f \u043a\u043b\u044e\u0447\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <em>reply_markup<\/em>, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>keyboard<\/em>:<\/p>\n<pre><code class=\"javascript\">'reply_markup' : JSON.stringify(keyboard)<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c <em>keyboard<\/em> \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b\u0443\u0447\u0438\u043c<\/p>\n<pre><code class=\"javascript\">function send(msg, chat_id, keyboard) {   const payload = {     'method': 'sendMessage',     'chat_id': String(chat_id),     'text': msg,     'parse_mode': 'HTML',     'reply_markup' : JSON.stringify(keyboard)   }   const data = {     'method': 'post',     'payload': payload,     'muteHttpExceptions': true   }     UrlFetchApp.fetch('https:\/\/api.telegram.org\/bot' + token + '\/', data); } <\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0434\u0435\u043f\u043b\u043e\u0438\u043c (<a href=\"https:\/\/habr.com\/en\/post\/585456\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?<\/a>). \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>api_connector()<\/em> \u0441 \u043d\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <em>appLink<\/em>  <\/p>\n<pre><code class=\"javascript\">function api_connector() {   const appLink = \"\u0412\u0430\u0448 URL\";   UrlFetchApp.fetch(\"https:\/\/api.telegram.org\/bot\"+token+\"\/setWebHook?url=\"+ appLink);  } <\/code><\/pre>\n<p>\u0418\u0434\u0435\u043c \u0432 \u0447\u0430\u0442, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438\u2026 \u0432\u0438\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442!  <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0411\u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442  <\/p>\n<pre><code class=\"javascript\">const doc = SpreadsheetApp.getActive(); const questionsSheet = doc.getSheetByName(\"Questions\"); const answersSheet = doc.getSheetByName(\"Answers\"); const usersSheet = doc.getSheetByName(\"Users\");  const token = \"\u0412\u0430\u0448 \u0442\u043e\u043a\u0435\u043d\"  function api_connector () {   const App_link = \"\u0412\u0430\u0448 URL\";   UrlFetchApp.fetch(\"https:\/\/api.telegram.org\/bot\"+token+\"\/setWebHook?url=\"+App_link);  }  function doPost(e) {   const update = JSON.parse(e.postData.contents);   let msgData = {}   if (update.hasOwnProperty('message')) {     msgData = {       id         : update.message.message_id,       chat_id    : update.message.chat.id,       user_name  : update.message.from.username,       text       : update.message.text,       is_msg     : true     };   }      sendQuestions(msgData.chat_id); }   function send(msg, chat_id, keyboard) {   const payload = {     'method': 'sendMessage',     'chat_id': String(chat_id),     'text': msg,     'parse_mode': 'HTML',     'reply_markup' : JSON.stringify(keyboard)   }   const data = {     'method': 'post',     'payload': payload,     'muteHttpExceptions': true   }     UrlFetchApp.fetch('https:\/\/api.telegram.org\/bot' + token + '\/', data); }  function sendQuestions(chat_id) {   const questionsArr = questionsSheet.getDataRange().getValues();   const answersArr = answersSheet.getDataRange().getValues();    Logger.log(questionsArr)   Logger.log(answersArr)    questionsArr.forEach(e => {     let arr = answersArr.filter(el => el[0] == e[0])     arr = arr.map(el => [{\"text\":el[1], \"callback_data\":el[1]}])     Logger.log(arr)      const keyboard = {<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-388893","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/388893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=388893"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/388893\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=388893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=388893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=388893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}