{"id":313736,"date":"2020-11-25T09:01:01","date_gmt":"2020-11-25T09:01:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=313736"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=313736","title":{"rendered":"Telegram-\u0431\u043e\u0442 \u043d\u0430 Java \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u2014 \u043e\u0442 \u0441\u0442\u0430\u0440\u0442\u0430 \u0434\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 heroku"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6w\/qt\/7x\/6wqt7xrh78jy3funcjujzpclbbg.jpeg\"><\/p>\n<h3>\u0414\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 Telegram-\u0431\u043e\u0442\u043e\u0432 \u043d\u0430 Java \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u2014 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441. \u0412 \u043d\u0435\u0439 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u0441 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043a\u0430\u043a \u043c\u0430\u043d\u0443\u0430\u043b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043a\u0435\u043b\u0435\u0442\u0430 \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043a \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u043e\u044f \u0434\u043e\u0447\u044c \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443, \u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u043a\u0438\u0434\u0430\u043b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u0430 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0430 \u00ab5 + 7 =\u00bb, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0433\u0443\u0433\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0451 \u0437\u0430\u0434\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0418 \u0442\u0443\u0442 \u043d\u0430 \u0433\u043b\u0430\u0437\u0430 \u043f\u043e\u043f\u0430\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c, \u0447\u0442\u043e Telegram \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Bot API 5.0. \u0411\u043e\u0442\u043e\u0432 \u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b, \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0431\u043e\u0442\u0430 \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0434\u0435\u043b\u043a\u0438. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438, \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043b\u0438\u0431\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 (\u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043d\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b), \u043b\u0438\u0431\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u043d \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043f\u0443\u0442\u044c. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u0443\u043c\u043d\u044b\u0445, \u0430 \u043d\u0435 \u0434\u043b\u044f \u043c\u0435\u043d\u044f. \u041f\u043e\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0431\u043e\u0442\u0430 \u2014 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u044a\u0435\u0445\u0430\u0442\u044c \u0432 \u0442\u0435\u043c\u0443.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0427\u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0435\u0441\u0442\u044c, \u0447\u0435\u0433\u043e \u043d\u0435\u0442<\/h3>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e:<\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0435\u043a\u0435\u043d\u0434\u0430 \u043d\u0435-\u0438\u043d\u043b\u0430\u0439\u043d \u0431\u043e\u0442\u0430 \u043d\u0430 Java 11 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Telegram Bot Api 5.0;<\/li>\n<li>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u0438\u0434\u0430 \/dosomething;<\/li>\n<li>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 (\u0442.\u0435. \u043d\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441 &quot;\/&quot;);<\/li>\n<li>\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432;<\/li>\n<li>\u0434\u0435\u043f\u043b\u043e\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u043e\u0442\u0430 \u043d\u0430 <a href=\"https:\/\/www.heroku.com\/\" rel=\"nofollow\">heroku<\/a>.<\/li>\n<\/ul>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <b>\u043d\u0435\u0442<\/b> \u043f\u0440\u043e:<\/p>\n<ul>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u043e\u0442\u043e\u0432, \u043d\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440 \u2014 \u044f \u0438\u0445 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b, \u043d\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043e\u043d\u0438 \u043c\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0438\u0441\u044c);<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u0439;<\/li>\n<li>\u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Word-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c;<\/li>\n<li>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u0435\u0441\u0442\u044b \u0438 \u0442.\u043f.;<\/li>\n<li>\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 <a href=\"https:\/\/t.me\/BotFather\" rel=\"nofollow\">BotFather<\/a> (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445, \u0432\u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u043f\u0430\u0432\u0448\u0438\u0439\u0441\u044f <a href=\"https:\/\/botcreators.ru\/blog\/kak-sozdat-svoego-bota-v-botfather\/\" rel=\"nofollow\">\u043c\u0430\u043d\u0443\u0430\u043b<\/a>).<\/li>\n<\/ul>\n<p>  \u0418\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435. \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e <a href=\"https:\/\/github.com\/taksebe-official\/mentalCalculation\" rel=\"nofollow\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/a> \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 GitHub. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0434\u0440\u0443\u0433 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443, \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u043f\u0440\u043e\u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e.<\/p>\n<h3>\u0411\u0438\u0437\u043d\u0435\u0441-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u043e\u0442\u0430<\/h3>\n<p>  \u041e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0442\u043a\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0449\u0435 \u0431\u044b\u043b\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u0434. \u0411\u043e\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ul>\n<li>\u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0443\u044e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>\/start<\/code>, <code>\/help<\/code> \u0438 <code>\/settings<\/code>;<\/li>\n<li>\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430. \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0442\u0440\u0438 \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 + \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u0445, \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430;<\/li>\n<li>\u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e \u043d\u0435\u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0438 \u0438\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c Word-\u0444\u0430\u0439\u043b \u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0438\u043b\u0438 \u0432\u043f\u0435\u0440\u0435\u043c\u0435\u0448\u043a\u0443 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>\/plus<\/code>, <code>\/minus<\/code> \u0438 <code>\/plusminus<\/code> \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/li>\n<\/ul>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u044b\u043a\u0430\u0442\u044c \u2014 <a href=\"https:\/\/t.me\/MentalCalculationBot\" rel=\"nofollow\">MentalCalculationBot<\/a> (\u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c). \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/n8\/vt\/rn\/n8vtrnm4mbkykoii5o6btp2nvpq.png\"><\/p>\n<h3>\u041e\u0431\u0449\u0438\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0431\u043e\u0442\u0430 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u043a\u043e\u043c\u0430\u043d\u0434;<\/li>\n<li>\u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043d\u0430 heroku.<\/li>\n<\/ul>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0443\u043d\u043a\u0442.<\/p>\n<h3>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f <a href=\"https:\/\/maven.apache.org\/\" rel=\"nofollow\">Apache Maven<\/a>. \u041d\u0443\u0436\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e <a href=\"https:\/\/core.telegram.org\/bots\" rel=\"nofollow\">Telegram Bots<\/a> \u0438 <a href=\"https:\/\/projectlombok.org\" rel=\"nofollow\">Lombok<\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 (\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 java-\u043c\u0435\u0442\u043e\u0434\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438).<\/p>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u0432\u044b\u0448\u043b\u043e \u0432 <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">pom.xml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">    &lt;groupId&gt;***&lt;\/groupId&gt;     &lt;artifactId&gt;***&lt;\/artifactId&gt;     &lt;version&gt;1.0-SNAPSHOT&lt;\/version&gt;     &lt;name&gt;***&lt;\/name&gt;     &lt;description&gt;***&lt;\/description&gt;     &lt;packaging&gt;jar&lt;\/packaging&gt;      &lt;properties&gt;         &lt;java.version&gt;11&lt;\/java.version&gt;         &lt;maven.compiler.source&gt;${java.version}&lt;\/maven.compiler.source&gt;         &lt;maven.compiler.target&gt;${java.version}&lt;\/maven.compiler.target&gt;         &lt;project.build.sourceEncoding&gt;UTF-8&lt;\/project.build.sourceEncoding&gt;         &lt;org.projectlombok.version&gt;1.18.16&lt;\/org.projectlombok.version&gt;         &lt;apache.poi.version&gt;4.1.2&lt;\/apache.poi.version&gt;         &lt;telegram.version&gt;5.0.1&lt;\/telegram.version&gt;     &lt;\/properties&gt;      &lt;dependencies&gt;         &lt;!-- Telegram API --&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.telegram&lt;\/groupId&gt;             &lt;artifactId&gt;telegrambots&lt;\/artifactId&gt;             &lt;version&gt;${telegram.version}&lt;\/version&gt;         &lt;\/dependency&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.telegram&lt;\/groupId&gt;             &lt;artifactId&gt;telegrambotsextensions&lt;\/artifactId&gt;             &lt;version&gt;${telegram.version}&lt;\/version&gt;         &lt;\/dependency&gt;         &lt;!-- Lombok --&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.projectlombok&lt;\/groupId&gt;             &lt;artifactId&gt;lombok&lt;\/artifactId&gt;             &lt;version&gt;${org.projectlombok.version}&lt;\/version&gt;             &lt;scope&gt;compile&lt;\/scope&gt;         &lt;\/dependency&gt;     &lt;\/dependencies&gt;      &lt;build&gt;         &lt;finalName&gt;${project.artifactId}&lt;\/finalName&gt;         &lt;plugins&gt;             &lt;plugin&gt;                 &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;                 &lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;                 &lt;version&gt;3.8.1&lt;\/version&gt;                 &lt;configuration&gt;                     &lt;release&gt;${java.version}&lt;\/release&gt;                     &lt;annotationProcessorPaths&gt;                         &lt;path&gt;                             &lt;groupId&gt;org.projectlombok&lt;\/groupId&gt;                             &lt;artifactId&gt;lombok&lt;\/artifactId&gt;                             &lt;version&gt;${org.projectlombok.version}&lt;\/version&gt;                         &lt;\/path&gt;                     &lt;\/annotationProcessorPaths&gt;                 &lt;\/configuration&gt;             &lt;\/plugin&gt;             &lt;plugin&gt;                 &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;                 &lt;artifactId&gt;maven-dependency-plugin&lt;\/artifactId&gt;                 &lt;version&gt;3.1.2&lt;\/version&gt;                 &lt;executions&gt;                     &lt;execution&gt;                         &lt;id&gt;copy-dependencies&lt;\/id&gt;                         &lt;phase&gt;package&lt;\/phase&gt;                         &lt;goals&gt;                             &lt;goal&gt;copy-dependencies&lt;\/goal&gt;                         &lt;\/goals&gt;                     &lt;\/execution&gt;                 &lt;\/executions&gt;             &lt;\/plugin&gt;             &lt;plugin&gt;                 &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;                 &lt;artifactId&gt;maven-surefire-plugin&lt;\/artifactId&gt;                 &lt;version&gt;3.0.0-M5&lt;\/version&gt;             &lt;\/plugin&gt;         &lt;\/plugins&gt;     &lt;\/build&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u041a\u043b\u0430\u0441\u0441 \u0431\u043e\u0442\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/h3>\n<p>  \u041c\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 Bot \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d \u043e\u0442 TelegramLongPolling<b>Command<\/b>Bot, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u043e\u0433\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 TelegramLongPollingBot.<\/p>\n<p>  CommandBot \u0445\u043e\u0440\u043e\u0448 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u043d\u0451\u043c \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u0438\u0451\u043c \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441 &quot;\/&quot;. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043a\u043e\u043c\u0430\u043d\u0434 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0438\u0445 \u043d\u0438\u0436\u0435), \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0431\u043e\u0442\u0430 \u0438 \u0443\u0436\u0435 \u0432 \u043d\u0438\u0445 \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  \u0412 \u043a\u043b\u0430\u0441\u0441\u0435 Bot \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043b\u0438 \u043c\u0443\u0441\u043e\u0440\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0443. \u0414\u043b\u044f \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u043e\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 processNonCommandUpdate(Update update) \u043a\u043b\u0430\u0441\u0441\u0430 Bot.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0435\u0433\u043e \u0438\u043c\u044f \u0438 \u0442\u043e\u043a\u0435\u043d, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043e\u0442 <a href=\"https:\/\/t.me\/BotFather\" rel=\"nofollow\">BotFather<\/a>. \u0412 \u0445\u043e\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0431\u043e\u0442\u0430 \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0449\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0431\u0435\u043a\u0435\u043d\u0434 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 Telegram, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0435\u0440\u0435\u0434 \u0440\u0435\u043b\u0438\u0437\u043e\u043c \u0441\u0442\u043e\u0438\u0442 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u043e\u0442\u0430 \u0438 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 \u043a\u043e\u0434\u0430 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0438\u0436\u0435).<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Bot.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import lombok.Getter; import org.telegram.telegrambots.extensions.bots.commandbot.TelegramLongPollingCommandBot; import org.telegram.telegrambots.meta.api.methods.send.SendMessage; import org.telegram.telegrambots.meta.api.objects.Message; import org.telegram.telegrambots.meta.api.objects.Update; import org.telegram.telegrambots.meta.api.objects.User; import org.telegram.telegrambots.meta.exceptions.TelegramApiException; import ru.taksebe.telegram.mentalCalculation.telegram.commands.operations.MinusCommand; import ru.taksebe.telegram.mentalCalculation.telegram.commands.operations.PlusCommand; import ru.taksebe.telegram.mentalCalculation.telegram.commands.operations.PlusMinusCommand; import ru.taksebe.telegram.mentalCalculation.telegram.commands.service.HelpCommand; import ru.taksebe.telegram.mentalCalculation.telegram.commands.service.SettingsCommand; import ru.taksebe.telegram.mentalCalculation.telegram.commands.service.StartCommand; import ru.taksebe.telegram.mentalCalculation.telegram.nonCommand.NonCommand; import ru.taksebe.telegram.mentalCalculation.telegram.nonCommand.Settings;  import java.util.HashMap; import java.util.Map;  public final class Bot extends TelegramLongPollingCommandBot {     private final String BOT_NAME;     private final String BOT_TOKEN;     \/\/\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439     private final NonCommand nonCommand;      \/**      * \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041a\u043b\u044e\u0447 - \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 id \u0447\u0430\u0442\u0430      *\/     @Getter     private static Map&lt;Long, Settings&gt; userSettings;      public Bot(String botName, String botToken) {         super();         this.BOT_NAME = botName;         this.BOT_TOKEN = botToken;         \/\/\u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438         this.nonCommand = new NonCommand();         \/\/\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b         register(new StartCommand(&quot;start&quot;, &quot;\u0421\u0442\u0430\u0440\u0442&quot;));         register(new PlusCommand(&quot;plus&quot;, &quot;\u0421\u043b\u043e\u0436\u0435\u043d\u0438\u0435&quot;));         register(new MinusCommand(&quot;minus&quot;, &quot;\u0412\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435&quot;));         register(new PlusMinusCommand(&quot;plusminus&quot;, &quot;\u0421\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435&quot;));         register(new HelpCommand(&quot;help&quot;,&quot;\u041f\u043e\u043c\u043e\u0449\u044c&quot;));         register(new SettingsCommand(&quot;settings&quot;, &quot;\u041c\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438&quot;));         userSettings = new HashMap&lt;&gt;();     }      @Override     public String getBotToken() {         return BOT_TOKEN;     }      @Override     public String getBotUsername() {         return BOT_NAME;     }      \/**      * \u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439      *\/     @Override      public void processNonCommandUpdate(Update update) {         Message msg = update.getMessage();         Long chatId = msg.getChatId();         String userName = getUserName(msg);          String answer = nonCommand.nonCommandExecute(chatId, userName, msg.getText());         setAnswer(chatId, userName, answer);     }      \/**      * \u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f      * @param msg \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435      *\/     private String getUserName(Message msg) {         User user = msg.getFrom();         String userName = user.getUserName();         return (userName != null) ? userName : String.format(&quot;%s %s&quot;, user.getLastName(), user.getFirstName());     }      \/**      * \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430      * @param chatId id \u0447\u0430\u0442\u0430      * @param userName \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f      * @param text \u0442\u0435\u043a\u0441\u0442 \u043e\u0442\u0432\u0435\u0442\u0430      *\/     private void setAnswer(Long chatId, String userName, String text) {         SendMessage answer = new SendMessage();         answer.setText(text);         answer.setChatId(chatId.toString());         try {             execute(answer);         } catch (TelegramApiException e) {             \/\/\u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u0431\u043e\u0439 Telegram Bot API, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f userName         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">NonCommand.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import ru.taksebe.telegram.mentalCalculation.exceptions.IllegalSettingsException; import ru.taksebe.telegram.mentalCalculation.telegram.Bot;  \/**  * \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 (\u0442.\u0435. \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441 &quot;\/&quot;)  *\/ public class NonCommand {      public String nonCommandExecute(Long chatId, String userName, String text) {         Settings settings;         String answer;         try {             \/\/\u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f             settings = createSettings(text);             \/\/\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u043c\u0430\u043f\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430             saveUserSettings(chatId, settings);             answer = &quot;\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b. \u0412\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0445 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \/settings&quot;;             \/\/\u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f userName         } catch (IllegalSettingsException e) {             answer = e.getMessage() +                     &quot;\\n\\n \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b. \u0412\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0445 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \/settings&quot;;             \/\/\u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f userName         } catch (Exception e) {             answer = &quot;\u041f\u0440\u043e\u0441\u0442\u0438\u0442\u0435, \u044f \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u0412\u0430\u0441. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0412\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \/help&quot;;             \/\/\u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f userName         }         return answer;     }      \/**      * \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f      * @param text \u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f      * @throws IllegalArgumentException \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u0443      *\/     private Settings createSettings(String text) throws IllegalArgumentException {         \/\/\u043e\u0442\u0441\u0435\u043a\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b, \u0441\u0442\u0438\u043a\u0435\u0440\u044b, \u0433\u0438\u0444\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0439 \u043c\u0443\u0441\u043e\u0440         if (text == null) {             throw new IllegalArgumentException(&quot;\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u043c&quot;);         }         \/\/\u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f 3 \u0447\u0438\u0441\u043b\u0430-\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 (min, max, listCount) \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443         return new Settings(min, max, listCount);     }      \/**      * \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043c\u0430\u043f\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430      * \u0415\u0441\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c\u0438, \u043e\u043d\u0438 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u043f\u0443\u0441\u0442\u0443\u044e \u043d\u0435 \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0442\u044c \u043c\u0430\u043f\u0443      * @param chatId id \u0447\u0430\u0442\u0430      * @param settings \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438      *\/     private void saveUserSettings(Long chatId, Settings settings) {         if (!settings.equals(Settings.getDefaultSettings())) {             Bot.getUserSettings().put(chatId, settings);         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u041a\u043b\u0430\u0441\u0441\u044b \u043a\u043e\u043c\u0430\u043d\u0434<\/h3>\n<p>  \u0412\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 BotCommand.<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043c\u043e\u0451\u043c \u0431\u043e\u0442\u0435 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 2 \u0433\u0440\u0443\u043f\u043f\u044b:<\/p>\n<ul>\n<li>\u0421\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e;<\/li>\n<li>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u2014 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0444\u0430\u0439\u043b \u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u043c\u0438.<\/li>\n<\/ul>\n<p>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0433\u0440\u0443\u043f\u043f \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430 \u2014 \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c \u0441\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043e\u0431\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0432 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0430 \u0438\u0445 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043b\u0438\u0448\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c, \u0433\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0421\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0421\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434. \u0412 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u0441\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441 \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u0442\u0432\u0435\u0442\u0430, \u0430 \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<p>  \u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u0441\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441 \u0421\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">ServiceCommand.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.telegram.telegrambots.extensions.bots.commandbot.commands.BotCommand; import org.telegram.telegrambots.meta.api.methods.send.SendMessage; import org.telegram.telegrambots.meta.bots.AbsSender; import org.telegram.telegrambots.meta.exceptions.TelegramApiException;  \/**  * \u0421\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434  *\/ abstract class ServiceCommand extends BotCommand {      ServiceCommand(String identifier, String description) {         super(identifier, description);     }      \/**      * \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e      *\/     void sendAnswer(AbsSender absSender, Long chatId, String commandName, String userName, String text) {         SendMessage message = new SendMessage();         \/\/\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u043c\u043e\u0434\u0437\u0438         message.enableMarkdown(true);         message.setChatId(chatId.toString());         message.setText(text);         try {             absSender.execute(message);         } catch (TelegramApiException e) {             \/\/\u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u0431\u043e\u0439 Telegram Bot API, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f commandName \u0438 userName         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0421\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">StartCommand.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.telegram.telegrambots.meta.api.objects.Chat; import org.telegram.telegrambots.meta.api.objects.User; import org.telegram.telegrambots.meta.bots.AbsSender;  \/**  * \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &quot;\u0421\u0442\u0430\u0440\u0442&quot;  *\/ public class StartCommand extends ServiceCommand {      public StartCommand(String identifier, String description) {         super(identifier, description);     }      @Override     public void execute(AbsSender absSender, User user, Chat chat, String[] strings) {         \/\/\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f - \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 userName \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f         String userName = (user.getUserName() != null) ? user.getUserName() :                 String.format(&quot;%s %s&quot;, user.getLastName(), user.getFirstName());         \/\/\u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0443 \u0441\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e\u0442\u0432\u0435\u0442\u0430         sendAnswer(absSender, chat.getId(), this.getCommandIdentifier(), userName,                 &quot;\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0451\u043c! \u0415\u0441\u043b\u0438 \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \/help&quot;);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u0441\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441\u0435 \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043f\u043e\u043c\u0438\u043c\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Word-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">OperationCommand.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.telegram.telegrambots.extensions.bots.commandbot.commands.BotCommand; import org.telegram.telegrambots.meta.api.methods.send.SendDocument; import org.telegram.telegrambots.meta.api.methods.send.SendMessage; import org.telegram.telegrambots.meta.api.objects.InputFile; import org.telegram.telegrambots.meta.bots.AbsSender; import org.telegram.telegrambots.meta.exceptions.TelegramApiException; import ru.taksebe.telegram.mentalCalculation.calculation.Calculator; import ru.taksebe.telegram.mentalCalculation.calculation.PlusMinusService; import ru.taksebe.telegram.mentalCalculation.enums.OperationEnum; import ru.taksebe.telegram.mentalCalculation.fileProcessor.WordFileProcessorImpl; import ru.taksebe.telegram.mentalCalculation.telegram.Settings;  import java.io.FileInputStream; import java.io.IOException; import java.util.List;  \/**  * \u0421\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438  *\/ abstract class OperationCommand extends BotCommand {     private PlusMinusService service;      OperationCommand(String identifier, String description) {         super(identifier, description);         this.service = new PlusMinusService(new WordFileProcessorImpl(), new Calculator());     }      \/**      * \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e      *\/     void sendAnswer(AbsSender absSender, Long chatId, List&lt;OperationEnum&gt; operations, String description, String commandName, String userName) {         try {             absSender.execute(createDocument(chatId, operations, description));         } catch (IOException | IllegalArgumentException e) {             sendError(absSender, chatId, commandName, userName);             e.printStackTrace();         } catch (TelegramApiException e) {             \/\/\u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u0431\u043e\u0439 Telegram Bot API, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f commandName \u0438 userName         }     }      \/**      * \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e      * @param chatId id \u0447\u0430\u0442\u0430      * @param operations \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 (\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\/\u0438\u043b\u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435)      * @param fileName \u0438\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u0443      *\/     private SendDocument createDocument(Long chatId, List&lt;OperationEnum&gt; operations, String fileName) throws IOException {         FileInputStream stream = service.getPlusMinusFile(operations, Bot.getUserSettings(chatId));         SendDocument document = new SendDocument();         document.setChatId(chatId.toString());         document.setDocument(new InputFile(stream, String.format(&quot;%s.docx&quot;, fileName)));         return document;     }      \/**      * \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435      *\/     private void sendError(AbsSender absSender, Long chatId, String commandName, String userName) {         try {             absSender.execute(new SendMessage(chatId.toString(), &quot;\u041f\u043e\u0445\u043e\u0436\u0435, \u044f \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0437\u0436\u0435&quot;));         } catch (TelegramApiException e) {             \/\/\u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u0431\u043e\u0439 Telegram Bot API, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f commandName \u0438 userName         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">PlusMinusCommand.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.telegram.telegrambots.meta.api.objects.Chat; import org.telegram.telegrambots.meta.api.objects.User; import org.telegram.telegrambots.meta.bots.AbsSender; import ru.taksebe.telegram.mentalCalculation.enums.OperationEnum;  \/**  * \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435  *\/ public class PlusMinusCommand extends OperationCommand {      public PlusMinusCommand(String identifier, String description) {         super(identifier, description);     }      @Override     public void execute(AbsSender absSender, User user, Chat chat, String[] strings) {         \/\/\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f - \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 userName \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f         String userName = (user.getUserName() != null) ? user.getUserName() :                 String.format(&quot;%s %s&quot;, user.getLastName(), user.getFirstName());         \/\/\u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0443 \u0441\u0443\u043f\u0435\u0440\u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u043d\u0430 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 (\u0437\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 getPlusMinus() \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f OperationEnum) \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e         sendAnswer(absSender, chat.getId(), OperationEnum.getPlusMinus(), this.getDescription(), this.getCommandIdentifier(), userName);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 main \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f TelegramBotsApi, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f Bot.<\/p>\n<p>  TelegramBotsApi \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 Class&lt;? extends BotSession&gt;. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u0435\u043a \u0441 \u043f\u0440\u043e\u043a\u0441\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c DefaultBotSession.class.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043c\u044f \u0438 \u0442\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430 \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c System.getenv().<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">MentalCalculationApplication.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.telegram.telegrambots.meta.TelegramBotsApi; import org.telegram.telegrambots.meta.exceptions.TelegramApiException; import org.telegram.telegrambots.updatesreceivers.DefaultBotSession; import ru.taksebe.telegram.mentalCalculation.telegram.Bot;  import java.util.Map;  public class MentalCalculationApplication {     private static final Map&lt;String, String&gt; getenv = System.getenv();      public static void main(String[] args) {         try {             TelegramBotsApi botsApi = new TelegramBotsApi(DefaultBotSession.class);             botsApi.registerBot(new Bot(getenv.get(&quot;BOT_NAME&quot;), getenv.get(&quot;BOT_TOKEN&quot;)));         } catch (TelegramApiException e) {             e.printStackTrace();         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u0414\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 <a href=\"https:\/\/www.heroku.com\/\" rel=\"nofollow\">heroku<\/a><\/h3>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0444\u0430\u0439\u043b Procfile \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<br \/>  <code>worker: java -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 -cp .\/target\/classes:.\/target\/dependency\/* &lt;\u043f\u0443\u0442\u044c \u0434\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 ru.taksebe.telegram.mentalCalculation.MentalCalculationApplication&gt;<\/code><br \/>  , \u0433\u0434\u0435 worker \u2014 \u044d\u0442\u043e \u0442\u0438\u043f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f Java, \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043e\u0442 8, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0444\u0430\u0439\u043b system.properties \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0451\u043c \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<br \/>  <code>java.runtime.version=&lt;\u0432\u0435\u0440\u0441\u0438\u044f Java&gt;<\/code><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0442\u0430\u043a\u043e\u0439:<\/p>\n<ol>\n<li>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 heroku \u0438 \u0438\u0434\u0451\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c;<\/li>\n<li><code>mvn clean install<\/code>;<\/li>\n<li><code>heroku login<\/code> \u2014 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0436\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u0438 \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430;<\/li>\n<li><code>heroku create &lt;\u0438\u043c\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f&gt;<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 heroku;<\/li>\n<li><code>git push heroku master<\/code> \u2014 \u043f\u0443\u0448\u0438\u043c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 heroku;<\/li>\n<li><code>heroku config:set BOT_NAME=&lt;\u0438\u043c\u044f \u0431\u043e\u0442\u0430&gt;<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043c\u044f \u0431\u043e\u0442\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f;<\/li>\n<li><code>heroku config:set BOT_TOKEN=&lt;\u0442\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430&gt;<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f;<\/li>\n<li><code>heroku config:get BOT_NAME<\/code> (\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e BOT_TOKEN) \u2014 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432\u0435\u0440\u043d\u043e;<\/li>\n<li><code>heroku ps:scale worker=1<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 (dynos) \u0434\u043b\u044f \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 worker (\u0440\u0430\u043d\u0435\u0435 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u044d\u0442\u043e\u0442 \u0442\u0438\u043f \u0432 Procfile), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0435\u0441\u0442\u0430\u0440\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0412 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u043d\u0430 heroku \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043b\u043e\u0433\u0430\u043c (\u043f\u0440\u044f\u0447\u0443\u0442\u0441\u044f \u043f\u043e\u0434 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u00abMore\u00bb \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443) \u0438 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e;<\/li>\n<li>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u043e\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 Telegram.<\/li>\n<\/ol>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u043e\u0434 \u043d\u0430 GitHub, \u0442\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u043d\u0430 heroku \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u00abDeploy\u00bb \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 GitHub-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 (\u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0438\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438), \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0443\u0448\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0432 \u0434\u0432\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<h3>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u041a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0432\u0441\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u0439 \u0441\u043e\u0432\u0435\u0442\u0441\u043a\u0438\u0439 \u043c\u0443\u043b\u044c\u0442\u0438\u043a \u043f\u0440\u043e <a href=\"https:\/\/youtu.be\/y6cR0n0rUoE\" rel=\"nofollow\">\u043a\u043e\u0437\u043b\u0451\u043d\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0447\u0438\u043b\u0441\u044f \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e 10<\/a>.<\/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\/post\/528694\/\"> https:\/\/habr.com\/ru\/post\/528694\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6w\/qt\/7x\/6wqt7xrh78jy3funcjujzpclbbg.jpeg\"><\/p>\n<h3>\u0414\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 Telegram-\u0431\u043e\u0442\u043e\u0432 \u043d\u0430 Java \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u2014 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441. \u0412 \u043d\u0435\u0439 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u0441 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043a\u0430\u043a \u043c\u0430\u043d\u0443\u0430\u043b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043a\u0435\u043b\u0435\u0442\u0430 \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043a \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u043e\u044f \u0434\u043e\u0447\u044c \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443, \u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u043a\u0438\u0434\u0430\u043b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u0430 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0430 \u00ab5 + 7 =\u00bb, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0433\u0443\u0433\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0451 \u0437\u0430\u0434\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0418 \u0442\u0443\u0442 \u043d\u0430 \u0433\u043b\u0430\u0437\u0430 \u043f\u043e\u043f\u0430\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c, \u0447\u0442\u043e Telegram \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Bot API 5.0. \u0411\u043e\u0442\u043e\u0432 \u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b, \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0431\u043e\u0442\u0430 \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0434\u0435\u043b\u043a\u0438. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438, \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043b\u0438\u0431\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 (\u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043d\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b), \u043b\u0438\u0431\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u043d \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043f\u0443\u0442\u044c. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u0443\u043c\u043d\u044b\u0445, \u0430 \u043d\u0435 \u0434\u043b\u044f \u043c\u0435\u043d\u044f. \u041f\u043e\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0431\u043e\u0442\u0430 \u2014 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u044a\u0435\u0445\u0430\u0442\u044c \u0432 \u0442\u0435\u043c\u0443.  <\/p>\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-313736","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313736","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=313736"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313736\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}