[{"data":1,"prerenderedAt":375},["ShallowReactive",2],{"integration-node-red-contrib-telegrambot\u002F":3},{"_id":4,"categories":5,"author":8,"description":10,"npmOwners":11,"npmScope":13,"name":4,"ffCertified":14,"downloads":15,"version":17,"updatedAt":18,"maintainers":19,"homepage":22,"bugs":23,"repository":25,"time":28,"lastUpdated":18,"created":29,"license":252,"githubOwner":12,"githubRepo":4,"examples":253,"readme":374},"node-red-contrib-telegrambot",[6,7],"catalogue_communication","catalogue",{"name":9},"Karl-Heinz Wind","Telegram bot nodes for Node-RED",[12],"windkh",null,false,{"week":16},2537,"18.1.0","2026-07-18T21:10:01.941Z",[20],{"name":12,"email":21},"karl-heinz.wind@web.de","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot#readme",{"url":24},"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fissues",{"type":26,"url":27},"git","git+https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot.git",{"created":29,"modified":18,"0.1.0":29,"0.2.0":30,"0.2.1":31,"0.2.2":32,"0.3.0":33,"0.4.0":34,"0.4.1":35,"1.0.0":36,"1.1.0":37,"1.2.0":38,"1.3.0":39,"1.3.1":40,"1.3.2":41,"1.4.0":42,"1.5.0":43,"1.6.0":44,"1.6.1":45,"1.7.0":46,"1.7.1":47,"1.8.0":48,"1.8.1":49,"1.9.0":50,"1.9.1":51,"1.9.2":52,"1.9.3":53,"1.10.0":54,"2.1.0":55,"2.2.0":56,"2.3.0":57,"2.4.0":58,"2.4.1":59,"2.5.0":60,"2.5.2":61,"2.6.0":62,"2.6.1":63,"2.7.0":64,"2.7.1":65,"2.7.2":66,"2.7.3":67,"2.8.0":68,"2.8.1":69,"2.9.1":70,"2.9.2":71,"3.0.0":72,"3.0.1":73,"3.0.2":74,"3.1.0":75,"3.1.1":76,"4.0.1":77,"4.1.0":78,"4.2.0":79,"4.3.0":80,"4.4.0":81,"4.4.1":82,"4.4.2":83,"4.5.0":84,"4.6.0":85,"4.7.0":86,"4.8.0":87,"5.0.0":88,"5.0.1":89,"5.1.0":90,"5.1.1":91,"5.1.2":92,"5.1.3":93,"5.1.4":94,"5.1.5":95,"5.2.1":96,"5.3.0":97,"5.4.0":98,"5.4.1":99,"5.5.0":100,"5.5.1":101,"5.5.2":102,"6.0.0":103,"6.0.1":104,"7.0.0":105,"7.1.0":106,"7.1.1":107,"7.1.2":108,"7.1.3":109,"7.1.4":110,"7.1.5":111,"7.2.0":112,"8.0.0":113,"8.1.0":114,"8.2.0":115,"8.3.0":116,"8.3.3":117,"8.4.0":118,"8.5.0":119,"8.6.0":120,"8.6.1":121,"8.6.3":122,"8.6.4":123,"8.7.0":124,"8.7.1":125,"8.8.0":126,"8.8.2":127,"8.9.0":128,"8.9.1":129,"8.9.2":130,"8.9.3":131,"8.9.4":132,"8.9.6":133,"8.10.0":134,"8.11.0":135,"8.12.0":136,"9.0.0":137,"9.1.1":138,"9.2.1":139,"9.3.1":140,"9.4.0":141,"9.4.1":142,"9.4.2":143,"9.4.3":144,"9.5.0":145,"9.6.0":146,"9.6.1":147,"9.6.2":148,"10.0.0":149,"10.0.1":150,"10.0.2":151,"10.0.3":152,"10.0.4":153,"10.0.6":154,"10.0.7":155,"10.0.9":156,"10.1.0":157,"10.2.0":158,"10.3.0":159,"10.4.0":160,"10.4.1":161,"11.0.0":162,"11.2.0":163,"11.2.1":164,"11.2.2":165,"11.2.3":166,"11.2.4":167,"11.3.0":168,"11.5.0":169,"11.6.0":170,"11.7.0":171,"11.8.0":172,"12.0.0":173,"13.1.0":174,"14.0.0":175,"14.1.0":176,"14.2.0":177,"14.3.0":178,"14.4.0":179,"14.5.0":180,"14.6.0":181,"14.7.0":182,"14.8.0":183,"14.8.1":184,"14.8.2":185,"14.8.4":186,"14.8.5":187,"14.8.6":188,"14.8.7":189,"14.9.1":190,"15.0.1":191,"15.1.0":192,"15.1.1":193,"15.1.3":194,"15.1.4":195,"15.1.6":196,"15.1.7":197,"15.1.8":198,"15.1.9":199,"15.1.10":200,"15.1.11":201,"16.0.0":202,"16.0.1":203,"16.0.2":204,"16.1.0":205,"16.1.2":206,"16.1.3":207,"16.2.0":208,"16.3.0":209,"16.3.1":210,"16.3.2":211,"16.3.3":212,"16.4.0":213,"17.0.0":214,"17.0.1":215,"17.0.2":216,"17.0.3":217,"17.0.4":218,"17.0.5":219,"17.0.6":220,"17.1.0":221,"17.1.1":222,"17.1.2":223,"17.1.3":224,"17.3.1":225,"17.4.0":226,"17.4.1":227,"17.4.2":228,"17.4.3":229,"17.4.4":230,"17.4.5":231,"17.4.6":232,"17.4.9":233,"17.4.7":234,"17.4.8":235,"17.4.10":236,"17.4.11":237,"17.4.12":238,"17.4.13":239,"17.4.14":240,"17.4.15":241,"17.4.16":242,"18.0.0-beta.1":243,"17.4.17":244,"18.0.0-beta.2":245,"18.0.0-beta.3":246,"18.0.0-beta.4":247,"18.0.0":248,"18.0.1":249,"18.0.2":250,"18.1.0":251},"2016-01-09T13:22:45.945Z","2016-01-09T15:45:35.501Z","2016-01-09T16:00:32.096Z","2016-01-09T17:01:48.676Z","2016-01-10T14:45:30.713Z","2016-01-10T15:26:33.180Z","2016-01-10T15:27:40.103Z","2016-01-10T16:07:16.076Z","2016-01-11T21:44:38.458Z","2016-01-27T21:10:52.143Z","2016-01-29T22:39:26.070Z","2016-01-30T19:40:11.514Z","2016-01-30T21:12:56.829Z","2016-01-31T14:47:17.297Z","2016-02-08T18:49:12.951Z","2016-02-20T22:04:55.365Z","2016-03-02T20:00:56.545Z","2016-03-07T20:05:19.082Z","2016-03-12T13:48:01.683Z","2016-03-14T19:39:24.913Z","2016-03-17T19:35:19.322Z","2016-03-19T14:19:16.115Z","2016-04-06T19:09:19.282Z","2016-04-09T05:42:51.967Z","2016-04-09T06:05:31.267Z","2016-04-18T06:03:56.363Z","2016-12-26T10:29:05.092Z","2017-05-07T12:15:45.298Z","2017-05-21T18:55:48.075Z","2017-06-04T20:01:06.629Z","2017-06-05T06:54:12.787Z","2017-07-22T10:13:08.853Z","2017-10-16T11:55:32.728Z","2017-10-16T12:56:33.930Z","2017-10-16T19:22:47.266Z","2017-10-29T20:13:51.609Z","2017-10-29T20:40:00.748Z","2017-11-23T19:28:33.046Z","2017-11-25T19:23:52.269Z","2018-03-11T20:18:19.671Z","2018-03-16T18:20:30.395Z","2018-03-30T18:07:02.351Z","2018-03-30T19:03:56.561Z","2018-03-30T19:24:47.569Z","2018-03-30T19:47:41.566Z","2018-03-31T11:13:48.898Z","2018-03-31T19:18:43.084Z","2018-04-01T13:07:54.651Z","2018-06-19T20:23:30.530Z","2018-09-18T20:08:40.727Z","2018-09-20T20:04:33.739Z","2018-09-20T21:27:29.439Z","2018-10-16T20:29:36.417Z","2018-12-09T20:08:59.123Z","2018-12-16T20:37:18.410Z","2018-12-24T14:30:47.831Z","2018-12-24T18:14:37.605Z","2018-12-26T17:27:22.995Z","2018-12-27T12:59:18.652Z","2018-12-29T18:47:44.241Z","2018-12-29T22:58:05.091Z","2019-01-04T16:27:45.890Z","2019-01-06T13:59:20.631Z","2019-01-06T14:43:00.612Z","2019-01-06T18:36:56.306Z","2019-01-22T14:16:00.070Z","2019-01-22T15:01:29.042Z","2019-02-02T22:39:24.869Z","2019-02-16T13:03:42.833Z","2019-04-02T20:44:20.708Z","2019-04-11T10:50:11.560Z","2019-04-15T07:35:40.875Z","2019-04-28T15:45:03.952Z","2019-08-26T13:42:35.015Z","2019-10-28T19:43:03.497Z","2019-11-24T12:31:00.776Z","2019-11-24T12:58:54.874Z","2019-12-21T16:06:56.109Z","2019-12-21T16:15:07.442Z","2020-03-21T16:44:21.504Z","2020-03-21T17:15:02.398Z","2020-03-21T17:32:20.951Z","2020-03-22T21:24:21.459Z","2020-03-29T20:24:27.401Z","2020-04-13T21:16:16.785Z","2020-05-02T20:22:53.303Z","2020-06-14T17:37:50.257Z","2020-07-26T08:47:36.457Z","2020-08-02T19:41:06.390Z","2020-08-14T11:40:58.477Z","2020-09-06T12:20:18.261Z","2020-09-06T12:44:03.796Z","2020-09-06T18:07:00.881Z","2020-09-10T19:17:16.083Z","2020-09-10T19:45:34.960Z","2020-10-03T20:18:18.321Z","2020-10-19T21:17:05.180Z","2020-11-08T16:56:27.732Z","2020-11-29T12:27:17.850Z","2020-11-29T13:57:51.123Z","2020-11-29T19:52:18.035Z","2020-11-30T19:53:18.469Z","2020-11-30T21:22:11.961Z","2020-12-01T19:27:11.886Z","2020-12-03T13:24:35.685Z","2021-03-08T20:04:24.974Z","2021-04-01T20:00:12.048Z","2021-04-02T15:23:00.855Z","2021-04-03T13:18:24.514Z","2021-04-03T14:38:30.237Z","2021-04-07T18:48:16.192Z","2021-05-02T10:27:23.145Z","2021-05-02T15:11:32.211Z","2021-05-06T18:35:02.746Z","2021-05-13T20:14:15.871Z","2021-05-24T10:16:50.772Z","2021-07-04T20:13:42.537Z","2021-07-21T21:28:44.967Z","2021-07-24T13:37:55.716Z","2021-07-24T14:00:22.909Z","2021-07-24T14:08:09.794Z","2021-07-25T17:07:38.279Z","2021-07-25T17:55:30.915Z","2021-07-31T21:43:00.764Z","2021-08-01T18:21:03.360Z","2021-08-22T19:45:45.815Z","2021-08-28T17:59:55.411Z","2021-10-03T19:37:38.467Z","2021-12-05T19:44:33.948Z","2021-12-12T14:17:51.076Z","2021-12-18T22:13:32.692Z","2021-12-19T12:12:33.245Z","2021-12-19T19:06:19.128Z","2021-12-19T19:22:05.956Z","2022-01-04T21:44:37.261Z","2022-02-01T15:37:15.375Z","2022-02-03T13:06:25.574Z","2022-02-03T20:41:49.049Z","2022-02-13T16:54:22.386Z","2022-04-07T20:25:51.814Z","2022-06-28T18:39:47.805Z","2022-06-28T19:19:13.024Z","2022-07-17T20:23:11.566Z","2022-07-17T20:49:09.619Z","2022-07-17T21:22:52.225Z","2022-08-28T16:26:57.053Z","2022-08-29T16:03:47.777Z","2022-09-01T21:09:29.463Z","2022-09-19T21:48:51.221Z","2022-09-20T20:10:58.445Z","2022-10-14T19:04:13.469Z","2022-10-15T17:21:05.019Z","2022-10-15T20:47:35.023Z","2022-10-16T21:05:46.688Z","2022-10-17T21:12:02.996Z","2022-10-18T07:59:33.343Z","2022-10-19T12:44:22.298Z","2022-10-19T19:53:45.104Z","2022-10-19T20:10:12.870Z","2022-10-21T19:03:29.936Z","2022-10-23T09:24:07.301Z","2023-01-22T21:00:24.799Z","2023-01-24T22:59:14.549Z","2023-04-15T20:38:13.881Z","2023-04-29T22:13:08.102Z","2023-06-13T20:33:24.757Z","2023-06-20T19:35:24.865Z","2023-08-29T19:39:18.798Z","2023-10-07T18:50:53.162Z","2024-01-14T19:41:51.610Z","2024-01-30T21:03:40.537Z","2024-04-26T20:37:43.016Z","2024-06-21T19:11:27.231Z","2024-06-21T20:15:20.052Z","2024-06-22T19:05:09.568Z","2024-07-02T21:29:03.954Z","2024-09-15T16:19:50.784Z","2025-01-08T20:57:04.948Z","2025-02-02T10:36:40.423Z","2025-02-08T22:18:27.358Z","2025-03-05T21:11:37.133Z","2025-03-30T20:00:17.032Z","2025-06-15T13:49:52.388Z","2025-10-02T07:30:17.471Z","2025-10-26T21:36:08.704Z","2025-11-23T12:29:03.873Z","2025-11-23T14:44:17.289Z","2025-11-23T15:39:24.282Z","2025-11-23T21:08:30.942Z","2026-01-11T08:57:09.832Z","2026-01-11T12:13:07.172Z","2026-03-04T20:31:12.521Z","2026-03-07T20:47:02.225Z","2026-03-14T15:33:56.666Z","2026-03-15T10:12:08.133Z","2026-03-26T22:26:34.812Z","2026-05-12T06:07:56.225Z","2026-05-13T08:05:42.553Z","2026-05-14T11:24:12.875Z","2026-05-14T17:30:14.894Z","2026-05-15T10:34:05.290Z","2026-05-15T12:11:55.543Z","2026-05-15T13:29:51.286Z","2026-05-17T10:58:13.663Z","2026-05-23T19:52:52.621Z","2026-05-23T19:57:17.681Z","2026-05-23T19:57:18.402Z","2026-05-23T20:02:05.809Z","2026-05-23T20:08:27.337Z","2026-05-23T20:36:20.867Z","2026-06-11T16:06:03.394Z","2026-06-15T19:30:10.028Z","2026-06-16T18:30:26.568Z","2026-06-16T18:45:56.851Z","2026-06-16T21:16:01.201Z","2026-06-23T21:10:00.156Z","2026-06-25T20:21:40.096Z","2026-06-25T20:39:17.657Z","2026-06-25T21:05:00.343Z","2026-07-05T18:46:23.778Z","2026-07-13T17:55:15.324Z","2026-07-17T06:30:26.527Z","2026-07-18T21:10:01.785Z","MIT",[254,260,266,272,278,284,290,296,302,308,314,320,326,332,338,344,350,356,362,368],{"name":255,"path":256,"url":257,"downloadUrl":258,"flow":259},"basiccustomkeyboard","examples\u002Fbasiccustomkeyboard.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fbasiccustomkeyboard.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fbasiccustomkeyboard.json","[{\"id\":\"80211883.fcf5f\",\"type\":\"telegram receiver\",\"z\":\"c8b50aaa.e632d\",\"name\":\"\",\"bot\":\"2db9661a.cf3b0a\",\"saveDataDir\":\"\",\"filterCommands\":false,\"x\":250,\"y\":1262,\"wires\":[[\"d719b18b.da75f8\"],[]]},{\"id\":\"d719b18b.da75f8\",\"type\":\"debug\",\"z\":\"c8b50aaa.e632d\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":430,\"y\":1262,\"wires\":[]},{\"id\":\"cd98abdd.e338f\",\"type\":\"inject\",\"z\":\"c8b50aaa.e632d\",\"name\":\"\",\"props\":[{\"p\":\"payload.content\",\"v\":\"\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payloadType\":\"str\",\"x\":230,\"y\":1160,\"wires\":[[\"2c2e5956.54b846\"]]},{\"id\":\"c8a8015.60267\",\"type\":\"telegram sender\",\"z\":\"c8b50aaa.e632d\",\"name\":\"\",\"bot\":\"2db9661a.cf3b0a\",\"x\":730,\"y\":1160,\"wires\":[[]]},{\"id\":\"2c2e5956.54b846\",\"type\":\"function\",\"z\":\"c8b50aaa.e632d\",\"name\":\"build keyboard\",\"func\":\"var opts = {\\n  reply_markup: JSON.stringify({\\n    keyboard: [\\n      ['A1'],\\n      ['A2']],\\n      'resize_keyboard' : true, \\n      'one_time_keyboard' : true\\n  })\\n};\\n\\n\\nmsg.error = false;\\n\u002F\u002F Dialogaufbau\\nmsg.payload.content = 'Selection?';\\nmsg.payload.options = opts;\\n\\n\\nmsg.payload.chatId = 123445;\\nmsg.payload.messageId = 99;\\nmsg.payload.sentMessageId = 99;\\nmsg.payload.type = \\\"message\\\";\\n\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":470,\"y\":1160,\"wires\":[[\"c8a8015.60267\",\"17b67c4e.c4738c\"]]},{\"id\":\"17b67c4e.c4738c\",\"type\":\"debug\",\"z\":\"c8b50aaa.e632d\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":690,\"y\":1220,\"wires\":[]},{\"id\":\"4f9f29f7.8abc78\",\"type\":\"comment\",\"z\":\"c8b50aaa.e632d\",\"name\":\"Custom keyboard: Reply with \\\"Telegram receiver\\\"\",\"info\":\"\",\"x\":370,\"y\":1102,\"wires\":[]},{\"id\":\"2db9661a.cf3b0a\",\"type\":\"telegram bot\",\"z\":\"\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":261,"path":262,"url":263,"downloadUrl":264,"flow":265},"basicinlinekeyboard","examples\u002Fbasicinlinekeyboard.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fbasicinlinekeyboard.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fbasicinlinekeyboard.json","[{\"id\":\"f7c18f49.063c4\",\"type\":\"telegram sender\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"haserroroutput\":false,\"outputs\":1,\"x\":670,\"y\":420,\"wires\":[[]]},{\"id\":\"f97878f7.de1bf8\",\"type\":\"function\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"build keyboard\",\"func\":\"var opts = {\\n  reply_markup: JSON.stringify({\\n    \\\"inline_keyboard\\\": [[\\n                {\\n                    \\\"text\\\": \\\"A1\\\",\\n                    \\\"callback_data\\\": \\\"1\\\"            \\n                }, \\n                {\\n                    \\\"text\\\": \\\"A2\\\",\\n                    \\\"callback_data\\\": \\\"2\\\"            \\n                }]\\n            ]\\n  })\\n};\\n\\nmsg.payload.content = \\\"Selection?\\\";\\nmsg.payload.options = opts;\\nmsg.payload.chatId = 138708568;\\nmsg.payload.messageId = 29;\\nmsg.payload.sentMessageId = 29;\\nmsg.payload.type = \\\"message\\\";\\n\\nreturn [ msg ];\\n\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":400,\"y\":420,\"wires\":[[\"f7c18f49.063c4\",\"67925ff5.4c7c9\"]]},{\"id\":\"67925ff5.4c7c9\",\"type\":\"debug\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":630,\"y\":380,\"wires\":[]},{\"id\":\"e1a6a394.269598\",\"type\":\"inject\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"props\":[{\"p\":\"payload.content\",\"v\":\"\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payloadType\":\"str\",\"x\":170,\"y\":420,\"wires\":[[\"f97878f7.de1bf8\"]]},{\"id\":\"981d4537.1ced18\",\"type\":\"telegram event\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"event\":\"callback_query\",\"autoanswer\":false,\"x\":180,\"y\":502,\"wires\":[[\"385615779f4b3364\"]]},{\"id\":\"93430912.0f4f4\",\"type\":\"comment\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"Inline keyboard: Reply with \\\"callback_query\\\"\",\"info\":\"\",\"x\":290,\"y\":362,\"wires\":[]},{\"id\":\"385615779f4b3364\",\"type\":\"function\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"answerCallbackQuery\",\"func\":\"var text = \\\"You clicked \\\" + msg.payload.content;\\nvar options = {\\n    \u002F\u002F text : text, \\u003c-- you can set the text here or use msg.payload.content \\n    show_alert : true,\\n    cache_time : 10\\n};\\n\\nmsg.payload.content = text;\\nmsg.payload.options = options;\\nmsg.payload.type = \\\"answerCallbackQuery\\\";\\n\\nreturn [ msg ];\\n\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":420,\"y\":500,\"wires\":[[\"f7c18f49.063c4\"]]},{\"id\":\"65ca12172854cc2d\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":267,"path":268,"url":269,"downloadUrl":270,"flow":271},"command","examples\u002Fcommand.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fcommand.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fcommand.json","[{\"id\":\"ff78bc5a.00874\",\"type\":\"telegram bot\",\"z\":\"70c3f45a.8f3c0c\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\"},{\"id\":\"a3b2b972.7ee418\",\"type\":\"telegram sender\",\"z\":\"70c3f45a.8f3c0c\",\"name\":\"\",\"bot\":\"ff78bc5a.00874\",\"x\":405.51483154296875,\"y\":738.9999771118164,\"wires\":[[]]},{\"id\":\"2b76dc18.af49e4\",\"type\":\"telegram command\",\"z\":\"70c3f45a.8f3c0c\",\"name\":\"\u002Ffoo\",\"command\":\"\u002Ffoo\",\"bot\":\"ff78bc5a.00874\",\"x\":146.510498046875,\"y\":744.3689804077148,\"wires\":[[\"a3b2b972.7ee418\"],[]]}]",{"name":273,"path":274,"url":275,"downloadUrl":276,"flow":277},"command2","examples\u002Fcommand2.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fcommand2.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fcommand2.json","[{\"id\":\"d6d9ccd1.801f6\",\"type\":\"telegram command\",\"z\":\"c70c2a9e.b44248\",\"name\":\"fly\",\"command\":\"\u002Ffly\",\"description\":\"fly\",\"registercommand\":true,\"language\":\"en\",\"bot\":\"c6c7223.f86e7e\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":150,\"y\":180,\"wires\":[[\"7313e4b1.71c23c\"],[]]},{\"id\":\"7313e4b1.71c23c\",\"type\":\"debug\",\"z\":\"c70c2a9e.b44248\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":410,\"y\":180,\"wires\":[]},{\"id\":\"44b84a66.0f9c54\",\"type\":\"telegram command\",\"z\":\"c70c2a9e.b44248\",\"name\":\"flieg\",\"command\":\"\u002Fflieg\",\"description\":\"flieg\",\"registercommand\":true,\"language\":\"de\",\"bot\":\"c6c7223.f86e7e\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":150,\"y\":240,\"wires\":[[\"c8ce8fe9.0cd4e\"],[]]},{\"id\":\"c8ce8fe9.0cd4e\",\"type\":\"debug\",\"z\":\"c70c2a9e.b44248\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":410,\"y\":240,\"wires\":[]},{\"id\":\"857af061.cdfaf\",\"type\":\"telegram command\",\"z\":\"c70c2a9e.b44248\",\"name\":\" mouche\",\"command\":\"\u002F mouche\",\"description\":\" mouche\",\"registercommand\":true,\"language\":\"fr\",\"bot\":\"c6c7223.f86e7e\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":150,\"y\":300,\"wires\":[[\"ccf2de10.6c27e\"],[]]},{\"id\":\"ccf2de10.6c27e\",\"type\":\"debug\",\"z\":\"c70c2a9e.b44248\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":410,\"y\":300,\"wires\":[]},{\"id\":\"806c23f5.6a583\",\"type\":\"comment\",\"z\":\"c70c2a9e.b44248\",\"name\":\"The same command in three different languages.\",\"info\":\"\u002Ffly as english with empty language en \\n\\n\u002Fflieg in german with language code de\\n\\n\u002Fmouche in french with language code fr\\n\",\"x\":280,\"y\":100,\"wires\":[]},{\"id\":\"c6c7223.f86e7e\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":279,"path":280,"url":281,"downloadUrl":282,"flow":283},"commandScopes","examples\u002FcommandScopes.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002FcommandScopes.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002FcommandScopes.json","[{\"id\":\"563fc70dfa8d7e2c\",\"type\":\"telegram command\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\u002Fdefault\",\"command\":\"\u002Fdefault\",\"description\":\"Default Scope\",\"registercommand\":true,\"language\":\"\",\"scope\":\"default\",\"bot\":\"3b6bfbc0.423a04\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":130,\"y\":80,\"wires\":[[\"4f10207aaad4513b\"],[]]},{\"id\":\"8b2142df67587b3f\",\"type\":\"telegram command\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\u002Fdefault_de\",\"command\":\"\u002Fdefault_de\",\"description\":\"Default Scope German\",\"registercommand\":true,\"language\":\"de\",\"scope\":\"default\",\"bot\":\"3b6bfbc0.423a04\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":140,\"y\":140,\"wires\":[[\"4f10207aaad4513b\"],[]]},{\"id\":\"4f10207aaad4513b\",\"type\":\"debug\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":390,\"y\":100,\"wires\":[]},{\"id\":\"a94c0280e4461bc8\",\"type\":\"telegram command\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\u002Fprivate\",\"command\":\"\u002Fprivate\",\"description\":\"All Private Chats\",\"registercommand\":true,\"language\":\"\",\"scope\":\"all_private_chats\",\"bot\":\"3b6bfbc0.423a04\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":130,\"y\":200,\"wires\":[[\"4f10207aaad4513b\"],[]]},{\"id\":\"bc9e074b21e2cf91\",\"type\":\"telegram command\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\u002Fprivate_de\",\"command\":\"\u002Fprivate_de\",\"description\":\"All Private Chats German\",\"registercommand\":true,\"language\":\"de\",\"scope\":\"all_private_chats\",\"bot\":\"3b6bfbc0.423a04\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":140,\"y\":260,\"wires\":[[\"4f10207aaad4513b\"],[]]},{\"id\":\"958d3f6064860334\",\"type\":\"telegram command\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\u002Fgroup\",\"command\":\"\u002Fgroup\",\"description\":\"All Group Chats\",\"registercommand\":true,\"language\":\"\",\"scope\":\"all_group_chats\",\"bot\":\"3b6bfbc0.423a04\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":130,\"y\":320,\"wires\":[[\"4f10207aaad4513b\"],[]]},{\"id\":\"f4a1a96173e2c73e\",\"type\":\"telegram command\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\u002Fgroup_de\",\"command\":\"\u002Fgroup_de\",\"description\":\"All Group Chats German\",\"registercommand\":true,\"language\":\"de\",\"scope\":\"all_group_chats\",\"bot\":\"3b6bfbc0.423a04\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":140,\"y\":380,\"wires\":[[\"4f10207aaad4513b\"],[]]},{\"id\":\"4fd086c44b0a7c0a\",\"type\":\"telegram command\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\u002Fadministrators\",\"command\":\"\u002Fadministrators\",\"description\":\"All Chats Administrators\",\"registercommand\":true,\"language\":\"\",\"scope\":\"all_chat_administrators\",\"bot\":\"3b6bfbc0.423a04\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":160,\"y\":440,\"wires\":[[\"4f10207aaad4513b\"],[]]},{\"id\":\"4df70894300fa784\",\"type\":\"telegram command\",\"z\":\"aafea27d96f58f0f\",\"name\":\"\u002Fadministrators_de\",\"command\":\"\u002Fadministrators_de\",\"description\":\"All Chats Administrators German\",\"registercommand\":true,\"language\":\"\",\"scope\":\"all_chat_administrators\",\"bot\":\"3b6bfbc0.423a04\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":170,\"y\":500,\"wires\":[[\"4f10207aaad4513b\"],[]]},{\"id\":\"3b6bfbc0.423a04\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":285,"path":286,"url":287,"downloadUrl":288,"flow":289},"control","examples\u002Fcontrol.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fcontrol.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fcontrol.json","[{\"id\":\"c4556e447b08dfb2\",\"type\":\"telegram control\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"outputs\":2,\"checkconnection\":true,\"hostname\":\"\",\"interval\":\"5\",\"timeout\":\"\",\"x\":590,\"y\":220,\"wires\":[[\"8e653b8e4f0b1ff5\"],[\"b61dd9627184ac37\"]]},{\"id\":\"8e653b8e4f0b1ff5\",\"type\":\"debug\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"polling\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":770,\"y\":200,\"wires\":[]},{\"id\":\"0d338f6a83e7e840\",\"type\":\"inject\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"start\",\"props\":[{\"p\":\"payload\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"{\\\"command\\\":\\\"start\\\"}\",\"payloadType\":\"json\",\"x\":380,\"y\":180,\"wires\":[[\"c4556e447b08dfb2\"]]},{\"id\":\"21b153a9b15a6f59\",\"type\":\"inject\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"stop\",\"props\":[{\"p\":\"payload\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"{\\\"command\\\":\\\"stop\\\"}\",\"payloadType\":\"json\",\"x\":380,\"y\":240,\"wires\":[[\"c4556e447b08dfb2\"]]},{\"id\":\"5eca9590b64c86c1\",\"type\":\"inject\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"restart\",\"props\":[{\"p\":\"payload\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"{\\\"command\\\":\\\"restart\\\",\\\"delay\\\":1000}\",\"payloadType\":\"json\",\"x\":380,\"y\":300,\"wires\":[[\"c4556e447b08dfb2\"]]},{\"id\":\"582141be17702b28\",\"type\":\"inject\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"command\",\"props\":[{\"p\":\"payload\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"{\\\"command\\\":\\\"command\\\",\\\"message\\\":{\\\"from\\\":{\\\"id\\\":0,\\\"username\\\":\\\"unknown\\\"},\\\"chat\\\":{\\\"id\\\":0},\\\"text\\\":\\\"\u002Ffoo\\\"}}\",\"payloadType\":\"json\",\"x\":380,\"y\":360,\"wires\":[[\"c4556e447b08dfb2\"]]},{\"id\":\"bf4e23a0ad144016\",\"type\":\"telegram command\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"\",\"command\":\"\u002Ffoo\",\"description\":\"\",\"registercommand\":false,\"language\":\"\",\"scope\":\"default\",\"bot\":\"65ca12172854cc2d\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":550,\"y\":380,\"wires\":[[\"bc6b81e91a9e1d62\"],[\"3bf77f470221cecd\"]]},{\"id\":\"bc6b81e91a9e1d62\",\"type\":\"debug\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"debug 69\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":780,\"y\":360,\"wires\":[]},{\"id\":\"3bf77f470221cecd\",\"type\":\"debug\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"debug 70\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":780,\"y\":400,\"wires\":[]},{\"id\":\"e01255b0b55cf370\",\"type\":\"comment\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"command\",\"info\":\"The control node can inject a command into all command nodes that use the same bot\",\"x\":200,\"y\":360,\"wires\":[]},{\"id\":\"b61dd9627184ac37\",\"type\":\"switch\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"\",\"property\":\"payload.isOnline\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"true\"},{\"t\":\"false\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":2,\"x\":770,\"y\":240,\"wires\":[[\"06333e3547d9d870\"],[\"6778dfbdd5caec51\"]]},{\"id\":\"06333e3547d9d870\",\"type\":\"debug\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"online\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":930,\"y\":220,\"wires\":[]},{\"id\":\"6778dfbdd5caec51\",\"type\":\"debug\",\"z\":\"d6bf7c08c7c5fdba\",\"name\":\"offline\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":930,\"y\":260,\"wires\":[]},{\"id\":\"65ca12172854cc2d\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"testenvironment\":false,\"updatemode\":\"polling\",\"addressfamily\":\"\",\"pollinterval\":\"1000\",\"usesocks\":false,\"sockshost\":\"192.168.178.200\",\"socksprotocol\":\"socks4\",\"socksport\":\"1080\",\"socksusername\":\"user\",\"sockspassword\":\"password\",\"bothost\":\"ihive.spdns.de\",\"botpath\":\"\",\"localbothost\":\"127.0.0.1\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":true,\"verboselogging\":false}]",{"name":291,"path":292,"url":293,"downloadUrl":294,"flow":295},"copymessage","examples\u002Fcopymessage.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fcopymessage.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fcopymessage.json","[{\"id\":\"7727eeae.3ff06\",\"type\":\"function\",\"z\":\"ed43e0f7.31d9\",\"name\":\"copy\",\"func\":\"msg.payload.copy = { chatId : -292227168 };\\n\\nmsg.payload.copy.options = {\\n    disable_notification : true\\n};\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":350,\"y\":420,\"wires\":[[\"5deafc81.1b37d4\"]]},{\"id\":\"c4d6200e.a014b\",\"type\":\"telegram receiver\",\"z\":\"ed43e0f7.31d9\",\"name\":\"\",\"bot\":\"5f67fb38.18d094\",\"saveDataDir\":\"\",\"filterCommands\":false,\"x\":150,\"y\":420,\"wires\":[[\"7727eeae.3ff06\"],[]]},{\"id\":\"5deafc81.1b37d4\",\"type\":\"telegram sender\",\"z\":\"ed43e0f7.31d9\",\"name\":\"\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":580,\"y\":420,\"wires\":[[]]},{\"id\":\"5f67fb38.18d094\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":297,"path":298,"url":299,"downloadUrl":300,"flow":301},"createpoll","examples\u002Fcreatepoll.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fcreatepoll.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fcreatepoll.json","[{\"id\":\"29f1d57e.66b52a\",\"type\":\"telegram sender\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":790,\"y\":40,\"wires\":[[]]},{\"id\":\"aeb4e2e8.ee8b\",\"type\":\"telegram event\",\"z\":\"7652eee0.6d11b\",\"name\":\"Poll\",\"bot\":\"5f67fb38.18d094\",\"event\":\"poll\",\"autoanswer\":false,\"x\":190,\"y\":360,\"wires\":[[\"78b59b12.6793e4\"]]},{\"id\":\"1e912334.8a1d2d\",\"type\":\"telegram receiver\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"bot\":\"5f67fb38.18d094\",\"saveDataDir\":\"\",\"filterCommands\":false,\"x\":230,\"y\":260,\"wires\":[[\"78b59b12.6793e4\",\"29f1d57e.66b52a\"],[]]},{\"id\":\"78b59b12.6793e4\",\"type\":\"debug\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":590,\"y\":300,\"wires\":[]},{\"id\":\"2bab010d.920a9e\",\"type\":\"telegram event\",\"z\":\"7652eee0.6d11b\",\"name\":\"Poll Answer\",\"bot\":\"5f67fb38.18d094\",\"event\":\"poll_answer\",\"autoanswer\":false,\"x\":210,\"y\":440,\"wires\":[[\"78b59b12.6793e4\"]]},{\"id\":\"75a3afbd.a59c8\",\"type\":\"telegram command\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"command\":\"\u002Fnewpoll1\",\"bot\":\"5f67fb38.18d094\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":200,\"y\":40,\"wires\":[[\"c50749bf.376108\"],[]]},{\"id\":\"c50749bf.376108\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"create poll\",\"func\":\"msg.payload.type = 'poll';\\nmsg.payload.content = \\\"What do you think?\\\";\\nmsg.payload.options = [\\\"A\\\", \\\"B\\\", \\\"C\\\" ];\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":390,\"y\":40,\"wires\":[[\"29f1d57e.66b52a\"]]},{\"id\":\"6a2b097c.bc1428\",\"type\":\"telegram command\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"command\":\"\u002Fnewpoll2\",\"bot\":\"5f67fb38.18d094\",\"strict\":false,\"hasresponse\":true,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":2,\"x\":200,\"y\":120,\"wires\":[[\"b2033371.73ece\"],[]]},{\"id\":\"b2033371.73ece\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"create poll with optional arguments\",\"func\":\"msg.payload.type = 'poll';\\nmsg.payload.content = \\\"What do you think?\\\";\\nmsg.payload.options = [\\\"A\\\", \\\"B\\\", \\\"C\\\" ];\\n\\n\u002F\u002F you can add optional arguments see\\n\u002F\u002F https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendpoll\\nmsg.payload.optional = {\\n    allows_multiple_answers : true\\n};\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":460,\"y\":100,\"wires\":[[\"29f1d57e.66b52a\"]]},{\"id\":\"5f67fb38.18d094\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":303,"path":304,"url":305,"downloadUrl":306,"flow":307},"downloadfile","examples\u002Fdownloadfile.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fdownloadfile.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fdownloadfile.json","[{\"id\":\"5b61e831f6a6d74d\",\"type\":\"telegram receiver\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"saveDataDir\":\"\",\"filterCommands\":false,\"x\":110,\"y\":120,\"wires\":[[\"7781831794d26351\"],[]]},{\"id\":\"e701c4fe8f5db67f\",\"type\":\"telegram sender\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"haserroroutput\":false,\"outputs\":1,\"x\":630,\"y\":120,\"wires\":[[\"f7fd168fb734c5cb\"]]},{\"id\":\"7781831794d26351\",\"type\":\"function\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"download first photo manually\",\"func\":\"if(msg.payload.type === 'photo'){\\n    \\n    \u002F\u002F manually download the first photo using the fileId.\\n    msg.payload.download = {\\n        fileId : msg.payload.photos[0].file_id,\\n        filePath : \\\"c:\\\\\\\\temp\\\",\\n        \u002F\u002F fileName : \\\"foo.jpg\\\" \u002F\u002F optional\\n    }\\n    return msg;\\n}\\n\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":370,\"y\":120,\"wires\":[[\"e701c4fe8f5db67f\"]]},{\"id\":\"f7fd168fb734c5cb\",\"type\":\"debug\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":850,\"y\":120,\"wires\":[]},{\"id\":\"65ca12172854cc2d\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"3000\",\"usesocks\":false,\"sockshost\":\"192.168.178.200\",\"socksprotocol\":\"socks5\",\"socksport\":\"1080\",\"socksusername\":\"\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":true}]",{"name":309,"path":310,"url":311,"downloadUrl":312,"flow":313},"dynamicauthorization","examples\u002Fdynamicauthorization.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fdynamicauthorization.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fdynamicauthorization.json","[{\"id\":\"ee5ccada.43f59\",\"type\":\"telegram sender\",\"z\":\"117ca2b6.9952d5\",\"name\":\"\",\"bot\":\"\",\"x\":570,\"y\":380,\"wires\":[[]]},{\"id\":\"aa3d783b.53061\",\"type\":\"telegram receiver\",\"z\":\"117ca2b6.9952d5\",\"name\":\"\",\"bot\":\"\",\"saveDataDir\":\"c:\\\\temp\\\\foo\",\"filterCommands\":false,\"x\":290,\"y\":420,\"wires\":[[\"3fe23b0b.35503c\",\"ee5ccada.43f59\"],[]]},{\"id\":\"3fe23b0b.35503c\",\"type\":\"debug\",\"z\":\"117ca2b6.9952d5\",\"name\":\"\",\"active\":false,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":560,\"y\":440,\"wires\":[]},{\"id\":\"7b3b2aee.330974\",\"type\":\"inject\",\"z\":\"117ca2b6.9952d5\",\"name\":\"\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"x\":270,\"y\":680,\"wires\":[[\"c140074e.b4b44\"]]},{\"id\":\"c140074e.b4b44\",\"type\":\"function\",\"z\":\"117ca2b6.9952d5\",\"name\":\"No Access\",\"func\":\"\u002F\u002F classic aproach for using context.\\ncontext.global.usernames = [];\\ncontext.global.chatids = [];\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":490,\"y\":680,\"wires\":[[]]},{\"id\":\"cd683e65.cff7b8\",\"type\":\"inject\",\"z\":\"117ca2b6.9952d5\",\"name\":\"\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"x\":270,\"y\":720,\"wires\":[[\"72b7bffd.9a79\"]]},{\"id\":\"72b7bffd.9a79\",\"type\":\"function\",\"z\":\"117ca2b6.9952d5\",\"name\":\"Grant access to User and chat 1\",\"func\":\"\u002F\u002F classic aproach for using context.\\ncontext.global.usernames = [ \\\"User\\\" ];\\ncontext.global.chatids = [ 1 ];\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":570,\"y\":720,\"wires\":[[]]},{\"id\":\"d9d3a4c6.9ed7f\",\"type\":\"change\",\"z\":\"117ca2b6.9952d5\",\"name\":\"Grant access to Sepp and Egon\",\"rules\":[{\"t\":\"set\",\"p\":\"usernames\",\"pt\":\"global\",\"to\":\"[\\\"Sepp\\\", \\\"Egon\\\"]\",\"tot\":\"json\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":560,\"y\":620,\"wires\":[[]]},{\"id\":\"6929b4a6.06892c\",\"type\":\"inject\",\"z\":\"117ca2b6.9952d5\",\"name\":\"\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"x\":270,\"y\":620,\"wires\":[[\"d9d3a4c6.9ed7f\"]]},{\"id\":\"fa9290c0.e55dc\",\"type\":\"change\",\"z\":\"117ca2b6.9952d5\",\"name\":\"No Access\",\"rules\":[{\"t\":\"set\",\"p\":\"usernames\",\"pt\":\"global\",\"to\":\"[\\\"Sepp\\\", \\\"Egon\\\"]\",\"tot\":\"json\"}],\"action\":\"\",\"property\":\"\",\"from\":\"\",\"to\":\"\",\"reg\":false,\"x\":490,\"y\":580,\"wires\":[[]]},{\"id\":\"6eebcb8a.ae350c\",\"type\":\"inject\",\"z\":\"117ca2b6.9952d5\",\"name\":\"\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"x\":270,\"y\":580,\"wires\":[[\"fa9290c0.e55dc\"]]},{\"id\":\"5615bf9b.6e0f38\",\"type\":\"comment\",\"z\":\"117ca2b6.9952d5\",\"name\":\"\",\"info\":\"You can make use of the context in two ways:\\n1. context.global.key = value\\n2. global.set(key, value)\\n\\nOnly the latter one can be seen in the context browser window while the first is only stored as variable in memory.\\n\\nThe config node must be configured as follows:\\n1. {context.global.hereyourkey} for approach one\\n2. {gobal.get(\\\"hereyoukey\\\")} for approach two\\n\\nIf the config starts with { and ends with } the expression is evaluated as script.\\n\\nIn this example you can write\\n{context.global.username}\\n{context.global.chatids}\\n\\nor \\n{global.get(\\\"usernames\\\")}\\n{global.get(\\\"chatids\\\")}\\n\\nI would recommend the latter one.\\n\",\"x\":260,\"y\":520,\"wires\":[]}]",{"name":315,"path":316,"url":317,"downloadUrl":318,"flow":319},"echo","examples\u002Fecho.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fecho.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fecho.json","[{\"id\":\"1f3cb0bd.e0c34f\",\"type\":\"telegram bot\",\"z\":\"8fa6460.f7059b8\",\"botname\":\"HeinzBot\"},{\"id\":\"59aeb36e.a6514c\",\"type\":\"telegram receiver\",\"z\":\"8fa6460.f7059b8\",\"name\":\"\",\"bot\":\"1f3cb0bd.e0c34f\",\"x\":109,\"y\":128,\"wires\":[[\"ec7432bc.138bd\"]]},{\"id\":\"ec7432bc.138bd\",\"type\":\"telegram sender\",\"z\":\"8fa6460.f7059b8\",\"name\":\"\",\"bot\":\"\",\"x\":386,\"y\":128,\"wires\":[]}]",{"name":321,"path":322,"url":323,"downloadUrl":324,"flow":325},"editMessageCaption","examples\u002FeditMessageCaption.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002FeditMessageCaption.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002FeditMessageCaption.json","[{\"id\":\"ca63e749.f0e1f8\",\"type\":\"telegram sender\",\"z\":\"7652eee0.6d11b\",\"name\":\"send initial message\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":620,\"y\":100,\"wires\":[[\"5c718b42.c971d4\"]]},{\"id\":\"b613abd7.8bda68\",\"type\":\"telegram command\",\"z\":\"7652eee0.6d11b\",\"name\":\"\u002Ffoo\",\"command\":\"\u002Ffoo\",\"bot\":\"5f67fb38.18d094\",\"strict\":false,\"hasresponse\":false,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":1,\"x\":130,\"y\":100,\"wires\":[[\"5be9089.9ff5ff8\"]]},{\"id\":\"5ebcc0ff.a1205\",\"type\":\"telegram sender\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":607.2405776977539,\"y\":206.6966896057129,\"wires\":[[\"ffecee00.85cf3\"]]},{\"id\":\"a3dfc497.3dd828\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"modified message\",\"func\":\"var messageId = context.global.messageId;\\nvar chatId = context.global.chatId;\\n\\nvar options = {\\n    chat_id : chatId,\\n    message_id : messageId\\n};\\n\\nmsg.payload = {\\n    type : 'editMessageCaption',\\n    content : \\\"The modified caption\\\",\\n    options : options,\\n}\\n\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":327.2405776977539,\"y\":206.6966896057129,\"wires\":[[\"5ebcc0ff.a1205\"]]},{\"id\":\"5c718b42.c971d4\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"save IDs\",\"func\":\"\u002F\u002F We store the messageId to be able to edit this reply in the callback query. \\ncontext.global.messageId = msg.payload.sentMessageId;\\ncontext.global.chatId = msg.payload.chatId;\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":817.9073638916016,\"y\":100.36340236663818,\"wires\":[[]]},{\"id\":\"ffecee00.85cf3\",\"type\":\"debug\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"targetType\":\"msg\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":827.2405776977539,\"y\":206.6966896057129,\"wires\":[]},{\"id\":\"b1c82a24.f874f8\",\"type\":\"inject\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"str\",\"x\":147.2405776977539,\"y\":206.6966896057129,\"wires\":[[\"a3dfc497.3dd828\"]]},{\"id\":\"5be9089.9ff5ff8\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"original message\",\"func\":\"\u002F\u002F content can be a file_id, url, local path...\\nmsg.payload.content = 'https:\u002F\u002Fwww.cleverfiles.com\u002Fhowto\u002Fwp-content\u002Fuploads\u002F2018\u002F03\u002Fminion.jpg';\\nmsg.payload.type = 'photo';\\nmsg.payload.caption = \\\"super cool\\\"\\n\\n\u002F* type can be one of the following\\nphoto\\naudio\\nvideo\\nsticker\\nvoice\\ndocument\\n*\u002F\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":350,\"y\":100,\"wires\":[[\"ca63e749.f0e1f8\"]]},{\"id\":\"5f67fb38.18d094\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":327,"path":328,"url":329,"downloadUrl":330,"flow":331},"editMessageMedia","examples\u002FeditMessageMedia.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002FeditMessageMedia.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002FeditMessageMedia.json","[{\"id\":\"edcf10da.82f94\",\"type\":\"telegram sender\",\"z\":\"7652eee0.6d11b\",\"name\":\"send initial media\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":632.7594223022461,\"y\":133.3033103942871,\"wires\":[[\"db8e5a96.69f8f8\"]]},{\"id\":\"d338f266.95ff8\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"original media\",\"func\":\"\u002F\u002F content can be a file_id, url, local path...\\nmsg.payload.content = \\\"c:\\\\\\\\temp\\\\\\\\sample1.png\\\";\\nmsg.payload.type = \\\"photo\\\";\\nmsg.payload.caption = \\\"Original Media\\\"\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":331.7592468261719,\"y\":134.3032283782959,\"wires\":[[\"edcf10da.82f94\"]]},{\"id\":\"8c682765.b34cf8\",\"type\":\"telegram command\",\"z\":\"7652eee0.6d11b\",\"name\":\"\u002Ffoo\",\"command\":\"\u002Ffoo\",\"bot\":\"5f67fb38.18d094\",\"strict\":false,\"hasresponse\":false,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":1,\"x\":162.75931549072266,\"y\":140.3032102584839,\"wires\":[[\"d338f266.95ff8\"]]},{\"id\":\"ad64ec3d.4d2b4\",\"type\":\"telegram sender\",\"z\":\"7652eee0.6d11b\",\"name\":\"send modified media\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":640,\"y\":240,\"wires\":[[\"3499a9a6.8ae146\"]]},{\"id\":\"3dc83d60.7cbcc2\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"modified media (local file)\",\"func\":\"var messageId = context.global.messageId;\\nvar chatId = context.global.chatId;\\n\\nvar options = {\\n    chat_id : chatId,\\n    message_id : messageId\\n};\\n\\n\u002F\u002F see https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inputmediaphoto\\nvar inputMediaPhoto = {\\n    type : \\\"photo\\\",\\n    media : \\\"c:\\\\\\\\temp\\\\\\\\sample2.png\\\",\\n    caption : \\\"modified image\\\"\\n}\\n    \\nmsg.payload = {\\n    type : 'editMessageMedia',\\n    content : inputMediaPhoto,\\n    options : options,\\n}\\n\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":370,\"y\":240,\"wires\":[[\"ad64ec3d.4d2b4\"]]},{\"id\":\"db8e5a96.69f8f8\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"save IDs\",\"func\":\"\u002F\u002F We store the messageId to be able to edit this reply in the callback query. \\ncontext.global.messageId = msg.payload.sentMessageId;\\ncontext.global.chatId = msg.payload.chatId;\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":840.6667861938477,\"y\":133.6667127609253,\"wires\":[[]]},{\"id\":\"3499a9a6.8ae146\",\"type\":\"debug\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"targetType\":\"msg\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":850,\"y\":240,\"wires\":[]},{\"id\":\"b55fa9d6.a7e438\",\"type\":\"inject\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"str\",\"x\":170,\"y\":240,\"wires\":[[\"3dc83d60.7cbcc2\"]]},{\"id\":\"8873ddbb.78ace\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"modified media (web url)\",\"func\":\"var messageId = context.global.messageId;\\nvar chatId = context.global.chatId;\\n\\nvar options = {\\n    chat_id : chatId,\\n    message_id : messageId\\n};\\n\\n\u002F\u002F see https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inputmediaphoto\\nvar inputMediaPhoto = {\\n    type : \\\"photo\\\",\\n    media : \\\"https:\u002F\u002Fwww.cleverfiles.com\u002Fhowto\u002Fwp-content\u002Fuploads\u002F2018\u002F03\u002Fminion.jpg\\\",\\n    caption : \\\"modified image\\\"\\n}\\n    \\nmsg.payload = {\\n    type : 'editMessageMedia',\\n    content : inputMediaPhoto,\\n    options : options,\\n}\\n\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":370,\"y\":300,\"wires\":[[\"ad64ec3d.4d2b4\"]]},{\"id\":\"5cb8a895.4191e8\",\"type\":\"inject\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"str\",\"x\":170,\"y\":300,\"wires\":[[\"8873ddbb.78ace\"]]},{\"id\":\"5f67fb38.18d094\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":333,"path":334,"url":335,"downloadUrl":336,"flow":337},"editMessageText","examples\u002FeditMessageText.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002FeditMessageText.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002FeditMessageText.json","[{\"id\":\"edcf10da.82f94\",\"type\":\"telegram sender\",\"z\":\"7652eee0.6d11b\",\"name\":\"send initial message\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":642.7594223022461,\"y\":133.3033103942871,\"wires\":[[\"db8e5a96.69f8f8\"]]},{\"id\":\"d338f266.95ff8\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"original message\",\"func\":\"msg.payload.type = 'message'\\nmsg.payload.content = 'The original message';\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":341.7592468261719,\"y\":134.3032283782959,\"wires\":[[\"edcf10da.82f94\"]]},{\"id\":\"8c682765.b34cf8\",\"type\":\"telegram command\",\"z\":\"7652eee0.6d11b\",\"name\":\"\u002Ffoo\",\"command\":\"\u002Ffoo\",\"bot\":\"5f67fb38.18d094\",\"strict\":false,\"hasresponse\":false,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":1,\"x\":162.75931549072266,\"y\":140.3032102584839,\"wires\":[[\"d338f266.95ff8\"]]},{\"id\":\"ad64ec3d.4d2b4\",\"type\":\"telegram sender\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":630,\"y\":240,\"wires\":[[\"3499a9a6.8ae146\"]]},{\"id\":\"3dc83d60.7cbcc2\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"modified message\",\"func\":\"var messageId = context.global.messageId;\\nvar chatId = context.global.chatId;\\n\\nvar options = {\\n    chat_id : chatId,\\n    message_id : messageId\\n};\\n\\nmsg.payload = {\\n    type : 'editMessageText',\\n    content : \\\"The modified message\\\",\\n    options : options,\\n}\\n\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":350,\"y\":240,\"wires\":[[\"ad64ec3d.4d2b4\"]]},{\"id\":\"db8e5a96.69f8f8\",\"type\":\"function\",\"z\":\"7652eee0.6d11b\",\"name\":\"save IDs\",\"func\":\"\u002F\u002F We store the messageId to be able to edit this reply in the callback query. \\ncontext.global.messageId = msg.payload.sentMessageId;\\ncontext.global.chatId = msg.payload.chatId;\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":840.6667861938477,\"y\":133.6667127609253,\"wires\":[[]]},{\"id\":\"3499a9a6.8ae146\",\"type\":\"debug\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"targetType\":\"msg\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":850,\"y\":240,\"wires\":[]},{\"id\":\"b55fa9d6.a7e438\",\"type\":\"inject\",\"z\":\"7652eee0.6d11b\",\"name\":\"\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"str\",\"x\":170,\"y\":240,\"wires\":[[\"3dc83d60.7cbcc2\"]]},{\"id\":\"5f67fb38.18d094\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":339,"path":340,"url":341,"downloadUrl":342,"flow":343},"editinlinekeyboard","examples\u002Feditinlinekeyboard.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Feditinlinekeyboard.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Feditinlinekeyboard.json","[{\"id\":\"20636f59.fed13\",\"type\":\"telegram event\",\"z\":\"a4fc2021eddfd308\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"event\":\"callback_query\",\"autoanswer\":true,\"x\":120,\"y\":440,\"wires\":[[\"f0a3c788.7bbb18\"]]},{\"id\":\"d0ae190d.071828\",\"type\":\"telegram sender\",\"z\":\"a4fc2021eddfd308\",\"name\":\"show inline keyboard\",\"bot\":\"65ca12172854cc2d\",\"haserroroutput\":false,\"outputs\":1,\"x\":562.7594223022461,\"y\":333.3033103942871,\"wires\":[[\"23220303.4a427c\"]]},{\"id\":\"3426758a.a2d09a\",\"type\":\"function\",\"z\":\"a4fc2021eddfd308\",\"name\":\"initial inline keyboard message\",\"func\":\"context.global.keyboard = { messageId : msg.payload.messageId };\\n\\nvar opts = {\\n  reply_parameters: { message_id: msg.payload.messageId },\\n  reply_markup: JSON.stringify({\\n    \\\"inline_keyboard\\\": [[\\n                {\\n                    \\\"text\\\": \\\"Yes\\\",\\n                    \\\"callback_data\\\": \\\"FOO YES\\\"            \\n                }, \\n                {\\n                    \\\"text\\\": \\\"No\\\",\\n                    \\\"callback_data\\\": \\\"FOO NO\\\"            \\n                }]\\n            ]\\n  })\\n};\\n\\nmsg.payload.content = 'Do you want to hide the inline keyboard?';\\nmsg.payload.options = opts;\\n\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"x\":301.7592468261719,\"y\":334.3032283782959,\"wires\":[[\"d0ae190d.071828\"]]},{\"id\":\"d7bfbd4.da4e34\",\"type\":\"telegram command\",\"z\":\"a4fc2021eddfd308\",\"name\":\"\u002Ffoo\",\"command\":\"\u002Ffoo\",\"description\":\"\",\"registercommand\":false,\"language\":\"\",\"bot\":\"65ca12172854cc2d\",\"strict\":false,\"hasresponse\":false,\"useregex\":false,\"removeregexcommand\":false,\"outputs\":1,\"x\":82.75931549072266,\"y\":340.3032102584839,\"wires\":[[\"3426758a.a2d09a\"]]},{\"id\":\"43cecef5.e2e93\",\"type\":\"function\",\"z\":\"a4fc2021eddfd308\",\"name\":\"YES REALLY\",\"func\":\"\u002F\u002F Hide the keyboard and forget the messageId\\nmsg.payload.type = 'deleteMessage';\\nmsg.payload.content = context.global.keyboard.messageId;\\ncontext.global.keyboard.messageId = null;\\n\\n\u002F\u002F You could also send a editMessageReplyMarkup with an empty reply_markup here\\nreturn msg;\\n\",\"outputs\":1,\"timeout\":\"\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":560,\"y\":440,\"wires\":[[\"8e746981.f48368\"]]},{\"id\":\"8e746981.f48368\",\"type\":\"telegram sender\",\"z\":\"a4fc2021eddfd308\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"haserroroutput\":false,\"outputs\":1,\"x\":790,\"y\":440,\"wires\":[[\"2e9b911.c6c726e\"]]},{\"id\":\"2c6089c4.883006\",\"type\":\"function\",\"z\":\"a4fc2021eddfd308\",\"name\":\"YES\",\"func\":\"\u002F\u002F This is the message id of the initial keyboard that is simply exchanged by a new one.\\nvar messageId = context.global.keyboard.messageId;\\n\\n\u002F\u002F This is a sample of how to send a second inline keyboard with modified buttons\\nvar reply_markup = JSON.stringify({\\n    \\\"inline_keyboard\\\": [[\\n                {\\n                    \\\"text\\\": \\\"Are you really sure?\\\",\\n                    \\\"callback_data\\\": \\\"FOO YES REALLY\\\"            \\n                }, \\n                {\\n                    \\\"text\\\": \\\"No\\\",\\n                    \\\"callback_data\\\": \\\"FOO NO\\\"            \\n                }]\\n            ]\\n  });\\n\\n\\nvar options = {\\n    chat_id : msg.payload.chatId,\\n    reply_markup : reply_markup,\\n    message_id : messageId\\n};\\n\\nmsg.payload.type = 'editMessageReplyMarkup';\\nmsg.payload.content = reply_markup;\\nmsg.payload.options = options;\\n\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"timeout\":\"\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":530,\"y\":400,\"wires\":[[\"8e746981.f48368\"]]},{\"id\":\"23220303.4a427c\",\"type\":\"function\",\"z\":\"a4fc2021eddfd308\",\"name\":\"save messageId\",\"func\":\"\u002F\u002F We store the messageId to be able to edit this reply in the callback query. \\ncontext.global.keyboard.messageId = msg.payload.sentMessageId;\\nreturn [ msg ];\\n\",\"outputs\":\"1\",\"noerr\":0,\"x\":780.6667861938477,\"y\":333.6667127609253,\"wires\":[[]]},{\"id\":\"2e9b911.c6c726e\",\"type\":\"debug\",\"z\":\"a4fc2021eddfd308\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"targetType\":\"msg\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":1030,\"y\":440,\"wires\":[]},{\"id\":\"f0a3c788.7bbb18\",\"type\":\"switch\",\"z\":\"a4fc2021eddfd308\",\"name\":\"check callback data\",\"property\":\"payload.content\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"FOO YES\",\"vt\":\"str\"},{\"t\":\"eq\",\"v\":\"FOO YES REALLY\",\"vt\":\"str\"},{\"t\":\"eq\",\"v\":\"FOO NO\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":3,\"x\":330,\"y\":440,\"wires\":[[\"2c6089c4.883006\"],[\"43cecef5.e2e93\"],[\"8e23029e.001b7\"]]},{\"id\":\"8e23029e.001b7\",\"type\":\"function\",\"z\":\"a4fc2021eddfd308\",\"name\":\"NO\",\"func\":\"msg.payload.type = 'answerCallbackQuery';\\nmsg.payload.options = {\\n    text : msg.payload.content,\\n    show_alert : true,  \u002F\u002F you can set this to true to open a dialog with the answer in the client.\\n};\\n\\nreturn msg;\\n\\n\",\"outputs\":1,\"timeout\":\"\",\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":530,\"y\":480,\"wires\":[[\"8e746981.f48368\"]]},{\"id\":\"65ca12172854cc2d\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"testenvironment\":false,\"updatemode\":\"polling\",\"pollinterval\":\"1000\",\"usesocks\":false,\"sockshost\":\"\",\"socksprotocol\":\"socks5\",\"socksport\":\"1080\",\"socksusername\":\"\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":true,\"verboselogging\":true}]",{"name":345,"path":346,"url":347,"downloadUrl":348,"flow":349},"errorhandling","examples\u002Ferrorhandling.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Ferrorhandling.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Ferrorhandling.json","[{\"id\":\"fbcbaf0f.1a4c3\",\"type\":\"catch\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"\",\"scope\":null,\"uncaught\":false,\"x\":156,\"y\":140,\"wires\":[[\"dab98e0e.f83fb\"]]},{\"id\":\"cc0d5363.33275\",\"type\":\"telegram sender\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"\",\"bot\":\"b5326aaf.cdbb18\",\"haserroroutput\":false,\"outputs\":1,\"x\":390,\"y\":200,\"wires\":[[\"8a49c6d5.37ccf8\"]]},{\"id\":\"80ba48a1.4af1e8\",\"type\":\"debug\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":570,\"y\":400,\"wires\":[]},{\"id\":\"8a49c6d5.37ccf8\",\"type\":\"debug\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":590,\"y\":200,\"wires\":[]},{\"id\":\"dab98e0e.f83fb\",\"type\":\"debug\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":336,\"y\":140,\"wires\":[]},{\"id\":\"fc55722d.e837c\",\"type\":\"inject\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"error\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"{\\\"chatId\\\":\\\"138708568\\\",\\\"type\\\":\\\"action\\\",\\\"content\\\":\\\"This will be handled by the catch-all error node.\\\"}\",\"payloadType\":\"json\",\"x\":156,\"y\":200,\"wires\":[[\"cc0d5363.33275\"]]},{\"id\":\"35318513.23421a\",\"type\":\"inject\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"error\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"{\\\"chatId\\\":\\\"138708568\\\",\\\"type\\\":\\\"action\\\",\\\"content\\\":\\\"This will be handled by the second output of the sender node.\\\"}\",\"payloadType\":\"json\",\"x\":156,\"y\":380,\"wires\":[[\"ff53180b.fc6bf8\"]]},{\"id\":\"ff53180b.fc6bf8\",\"type\":\"telegram sender\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"\",\"bot\":\"b5326aaf.cdbb18\",\"haserroroutput\":true,\"outputs\":2,\"x\":390,\"y\":380,\"wires\":[[\"cfb0ed56.6673\"],[\"80ba48a1.4af1e8\"]]},{\"id\":\"cfb0ed56.6673\",\"type\":\"debug\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":590,\"y\":360,\"wires\":[]},{\"id\":\"6a07e213.40bd6c\",\"type\":\"comment\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"Example 1: errors are handled in \\\"catch all\\\"\",\"info\":\"\",\"x\":256,\"y\":100,\"wires\":[]},{\"id\":\"33a85a47.7ed9d6\",\"type\":\"comment\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"Example 2: errors are handled using second output\",\"info\":\"\",\"x\":290,\"y\":340,\"wires\":[]},{\"id\":\"8ab80062.2a838\",\"type\":\"inject\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"success\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"{\\\"chatId\\\":\\\"138708568\\\",\\\"type\\\":\\\"message\\\",\\\"content\\\":\\\"This should be successful.\\\"}\",\"payloadType\":\"json\",\"x\":160,\"y\":240,\"wires\":[[\"cc0d5363.33275\"]]},{\"id\":\"39defe26.6a5382\",\"type\":\"inject\",\"z\":\"f86d9fd2.9f14c\",\"name\":\"success\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"{\\\"chatId\\\":\\\"138708568\\\",\\\"type\\\":\\\"message\\\",\\\"content\\\":\\\"This should be successful.\\\"}\",\"payloadType\":\"json\",\"x\":160,\"y\":420,\"wires\":[[\"ff53180b.fc6bf8\"]]},{\"id\":\"b5326aaf.cdbb18\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":351,"path":352,"url":353,"downloadUrl":354,"flow":355},"externalreceiver1","examples\u002Fexternalreceiver1.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fexternalreceiver1.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fexternalreceiver1.json","[{\"id\":\"2d5c9313bbf6bd50\",\"type\":\"telegram receiver\",\"z\":\"f9295af027c7e5e7\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"saveDataDir\":\"\",\"filterCommands\":false,\"hasinput\":true,\"inputs\":1,\"x\":750,\"y\":560,\"wires\":[[\"1b2188ae52d7c9df\"],[]]},{\"id\":\"1b2188ae52d7c9df\",\"type\":\"debug\",\"z\":\"f9295af027c7e5e7\",\"name\":\"debug 55\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":940,\"y\":560,\"wires\":[]},{\"id\":\"544b9de355a4db12\",\"type\":\"inject\",\"z\":\"f9295af027c7e5e7\",\"name\":\"\",\"props\":[],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":310,\"y\":560,\"wires\":[[\"3ad636d773fcffd7\"]]},{\"id\":\"3ad636d773fcffd7\",\"type\":\"function\",\"z\":\"f9295af027c7e5e7\",\"name\":\"create sample update\",\"func\":\"\u002F\u002F Note that payload is an array, which means you can inject more than one update at a time.\\n\u002F\u002F However you can also send single updates as an alternative.\\nmsg.payload = [{\\n    \\\"update_id\\\": 123,\\n        \\\"message\\\": {\\n        \\\"message_id\\\": 123,\\n            \\\"from\\\": {\\n            \\\"id\\\": 123,\\n                \\\"is_bot\\\": false,\\n                    \\\"first_name\\\": \\\"Bigfoot\\\",\\n                        \\\"last_name\\\": \\\"Yeti\\\",\\n                            \\\"username\\\": \\\"Bigfoot\\\",\\n                                \\\"language_code\\\": \\\"en\\\"\\n        },\\n        \\\"chat\\\": {\\n            \\\"id\\\": 123,\\n                \\\"first_name\\\": \\\"Bigfoot\\\",\\n                    \\\"last_name\\\": \\\"Yeti\\\",\\n                        \\\"username\\\": \\\"Bigfoot\\\",\\n                            \\\"type\\\": \\\"private\\\"\\n        },\\n        \\\"date\\\": 1763891508,\\n            \\\"text\\\": \\\"Hello guys\\\"\\n    }\\n}]\\nreturn msg;\",\"outputs\":1,\"timeout\":0,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":500,\"y\":560,\"wires\":[[\"2d5c9313bbf6bd50\"]]},{\"id\":\"65ca12172854cc2d\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"testenvironment\":false,\"updatemode\":\"none\",\"addressfamily\":\"\",\"pollinterval\":\"1000\",\"usesocks\":false,\"sockshost\":\"192.168.178.200\",\"socksprotocol\":\"socks4\",\"socksport\":\"1080\",\"socksusername\":\"user\",\"sockspassword\":\"password\",\"bothost\":\"ihive.spdns.de\",\"botpath\":\"\",\"localbothost\":\"127.0.0.1\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":true,\"verboselogging\":false}]",{"name":357,"path":358,"url":359,"downloadUrl":360,"flow":361},"externalreceiver2","examples\u002Fexternalreceiver2.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fexternalreceiver2.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fexternalreceiver2.json","[{\"id\":\"21e19a0e7b231297\",\"type\":\"telegram receiver\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"saveDataDir\":\"\",\"filterCommands\":false,\"hasinput\":true,\"inputs\":1,\"x\":790,\"y\":320,\"wires\":[[\"31b70ebc109e1528\"],[]]},{\"id\":\"31b70ebc109e1528\",\"type\":\"debug\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"debug 56\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":980,\"y\":320,\"wires\":[]},{\"id\":\"55179d7f45e11a59\",\"type\":\"http request\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"\",\"method\":\"use\",\"ret\":\"obj\",\"paytoqs\":\"ignore\",\"url\":\"\",\"tls\":\"\",\"persist\":true,\"proxy\":\"\",\"insecureHTTPParser\":false,\"authType\":\"\",\"senderr\":false,\"headers\":[],\"x\":570,\"y\":280,\"wires\":[[\"d3ea80fac1a34577\",\"21e19a0e7b231297\",\"4907bf64279072ba\"]]},{\"id\":\"d3ea80fac1a34577\",\"type\":\"debug\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"debug 57\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":980,\"y\":260,\"wires\":[]},{\"id\":\"925ad86cbee184a6\",\"type\":\"inject\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"\",\"props\":[],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":190,\"y\":280,\"wires\":[[\"20f92b7829f272e3\"]]},{\"id\":\"20f92b7829f272e3\",\"type\":\"function\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"create request\",\"func\":\"let offset = flow.get(\\\"offset\\\");\\nlet timeout = 10;\\nlet token = \\\"\\u003cyour bot token here\\u003e\\\";\\nmsg.method = \\\"POST\\\";\\nmsg.url = \\\"https:\u002F\u002Fapi.telegram.org\u002Fbot\\\" + token + \\\"\u002FgetUpdates?offset=\\\"+offset+\\\"\\u0026timeout=\\\" + timeout;\\nreturn msg;\",\"outputs\":1,\"timeout\":0,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":380,\"y\":280,\"wires\":[[\"55179d7f45e11a59\",\"13c46adfbf916ea0\"]]},{\"id\":\"4907bf64279072ba\",\"type\":\"function\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"update offset\",\"func\":\"if(msg.payload.ok === true) {\\n    let msgOffset = msg.payload.result.length - 1;\\n    if(msgOffset \\u003e= 0) {\\n        let offset = msg.payload.result[msgOffset].update_id + 1;\\n        flow.set(\\\"offset\\\", offset);\\n    }\\n}\\n\\nreturn msg;\",\"outputs\":1,\"timeout\":0,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":770,\"y\":220,\"wires\":[[\"20f92b7829f272e3\"]]},{\"id\":\"13c46adfbf916ea0\",\"type\":\"debug\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"debug 58\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":560,\"y\":340,\"wires\":[]},{\"id\":\"726a7e63c79777fc\",\"type\":\"inject\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"Initialization\",\"props\":[],\"repeat\":\"\",\"crontab\":\"\",\"once\":true,\"onceDelay\":0.1,\"topic\":\"\",\"x\":210,\"y\":180,\"wires\":[[\"04a640784be8d59c\"]]},{\"id\":\"04a640784be8d59c\",\"type\":\"function\",\"z\":\"5bf8995c5bcae0bd\",\"name\":\"initialize offset\",\"func\":\"flow.set(\\\"offset\\\", 0)\\nreturn msg;\",\"outputs\":1,\"timeout\":0,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":400,\"y\":180,\"wires\":[[]]},{\"id\":\"65ca12172854cc2d\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"testenvironment\":false,\"updatemode\":\"none\",\"addressfamily\":\"\",\"pollinterval\":\"1000\",\"usesocks\":false,\"sockshost\":\"192.168.178.200\",\"socksprotocol\":\"socks4\",\"socksport\":\"1080\",\"socksusername\":\"user\",\"sockspassword\":\"password\",\"bothost\":\"ihive.spdns.de\",\"botpath\":\"\",\"localbothost\":\"127.0.0.1\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":true,\"verboselogging\":false}]",{"name":363,"path":364,"url":365,"downloadUrl":366,"flow":367},"forwardmessage","examples\u002Fforwardmessage.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fforwardmessage.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fforwardmessage.json","[{\"id\":\"2f17b49a.ba9b7c\",\"type\":\"telegram receiver\",\"z\":\"ed43e0f7.31d9\",\"name\":\"\",\"bot\":\"5f67fb38.18d094\",\"saveDataDir\":\"\",\"filterCommands\":false,\"x\":150,\"y\":280,\"wires\":[[\"ceb21a7e.1564c8\"],[]]},{\"id\":\"981acf13.a4a1b\",\"type\":\"telegram sender\",\"z\":\"ed43e0f7.31d9\",\"name\":\"\",\"bot\":\"5f67fb38.18d094\",\"haserroroutput\":false,\"outputs\":1,\"x\":580,\"y\":280,\"wires\":[[]]},{\"id\":\"ceb21a7e.1564c8\",\"type\":\"function\",\"z\":\"ed43e0f7.31d9\",\"name\":\"forward\",\"func\":\"msg.payload.forward = { chatId : -292227168 };\\n\\nmsg.payload.forward.options = {\\n    disable_notification : true\\n};\\n\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"x\":370,\"y\":280,\"wires\":[[\"981acf13.a4a1b\"]]},{\"id\":\"5f67fb38.18d094\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"300\",\"usesocks\":false,\"sockshost\":\"\",\"socksport\":\"6667\",\"socksusername\":\"anonymous\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":false}]",{"name":369,"path":370,"url":371,"downloadUrl":372,"flow":373},"getfile","examples\u002Fgetfile.json","https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fgetfile.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fexamples\u002Fgetfile.json","[{\"id\":\"56385912acc6a6ba\",\"type\":\"telegram receiver\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"saveDataDir\":\"\",\"filterCommands\":false,\"x\":190,\"y\":220,\"wires\":[[\"c570b04911862843\",\"3f26294392ed5771\"],[]]},{\"id\":\"c7d66fca7bbfef5b\",\"type\":\"telegram sender\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"bot\":\"65ca12172854cc2d\",\"haserroroutput\":false,\"outputs\":1,\"x\":750,\"y\":220,\"wires\":[[\"4321b804e33f0b4a\"]]},{\"id\":\"4321b804e33f0b4a\",\"type\":\"debug\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":950,\"y\":220,\"wires\":[]},{\"id\":\"3f26294392ed5771\",\"type\":\"function\",\"z\":\"ec1cf3fd9654e7e5\",\"name\":\"get info about first photo manually\",\"func\":\"if(msg.payload.type === 'photo'){\\n    \\n    \u002F\u002F manually download the first photo using the fileId.\\n    msg.payload.getfile = {\\n        fileId : msg.payload.photos[msg.payload.photos.length - 1].file_id,\\n    }\\n    return msg;\\n}\\n\",\"outputs\":1,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":460,\"y\":220,\"wires\":[[\"c7d66fca7bbfef5b\"]]},{\"id\":\"65ca12172854cc2d\",\"type\":\"telegram bot\",\"botname\":\"HeinzBot\",\"usernames\":\"\",\"chatids\":\"\",\"baseapiurl\":\"\",\"updatemode\":\"polling\",\"pollinterval\":\"1000\",\"usesocks\":false,\"sockshost\":\"192.168.178.200\",\"socksprotocol\":\"socks5\",\"socksport\":\"1080\",\"socksusername\":\"\",\"sockspassword\":\"\",\"bothost\":\"\",\"botpath\":\"\",\"localbotport\":\"8443\",\"publicbotport\":\"8443\",\"privatekey\":\"\",\"certificate\":\"\",\"useselfsignedcertificate\":false,\"sslterminated\":false,\"verboselogging\":true}]","\u003Ch1 id=\"telegram-bot-nodes-for-node-red\">\u003Ca class=\"header-anchor\" href=\"#telegram-bot-nodes-for-node-red\">Telegram bot nodes for Node-RED\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fnodered.org\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-Node--RED-red\" alt=\"Platform\" \u002F>\u003C\u002Fa>\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fwindkh\u002Fnode-red-contrib-telegrambot.svg\" alt=\"License\" \u002F>\n\u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fnode-red-contrib-telegrambot\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Fnode-red-contrib-telegrambot.svg\" alt=\"Downloads\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fnode-red-contrib-telegrambot\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdt\u002Fnode-red-contrib-telegrambot.svg\" alt=\"Total Downloads\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fwww.npmjs.org\u002Fpackage\u002Fnode-red-contrib-telegrambot\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fnode-red-contrib-telegrambot?logo=npm\" alt=\"NPM\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fsnyk.io\u002Ftest\u002Fnpm\u002Fnode-red-contrib-telegrambot\">\u003Cimg src=\"https:\u002F\u002Fsnyk.io\u002Ftest\u002Fnpm\u002Fnode-red-contrib-telegrambot\u002Fbadge.svg\" alt=\"Known Vulnerabilities\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Ft.me\u002Fnodered_telegrambot\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FJoin-Telegram%20Chat-blue.svg?logo=telegram\" alt=\"Telegram\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fpackagequality.com\u002F#?package=node-red-contrib-telegrambot\">\u003Cimg src=\"https:\u002F\u002Fpackagequality.com\u002Fshield\u002Fnode-red-contrib-telegrambot.svg\" alt=\"Package Quality\" \u002F>\u003C\u002Fa>\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fci.yml\" alt=\"Build\" \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fissues\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-raw\u002Fwindkh\u002Fnode-red-contrib-telegrambot.svg\" alt=\"Open Issues\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fissues?q=is%3Aissue+is%3Aclosed\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-closed-raw\u002Fwindkh\u002Fnode-red-contrib-telegrambot.svg\" alt=\"Closed Issues\" \u002F>\u003C\u002Fa>\n...\u003C\u002Fp>\n\u003Cp>This package contains a receiver and a sender node which act as a Telegram Bot.\nThe only thing required is the \u003Ccode>token\u003C\u002Fcode> that can be retrieved by the \u003Ccode>@botfather\u003C\u002Fcode> \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\">Telegram Bot\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Ch2 id=\"-upgrading-from-v17-to-v18\">\u003Ca class=\"header-anchor\" href=\"#-upgrading-from-v17-to-v18\">⚠ Upgrading from V17 to V18\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>V18.0.0 swaps the underlying \u003Ccode>node-telegram-bot-api\u003C\u002Fcode> library from v0.66 to v1.0.0 — a substantial rewrite that drops several legacy \u003Ccode>msg.payload.options\u003C\u002Fcode> field names. Existing V17 flows keep working transparently via a built-in compatibility shim that emits a one-time deprecation warning per node and rewrites the field on-the-fly, but the recommended migration target is the new shape. See \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002FMIGRATION.md\">MIGRATION.md\u003C\u002Fa> for the full list and rewrite recipes.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>V18 is now the stable release\u003C\u002Fstrong> on the \u003Ccode>latest\u003C\u002Fcode> dist-tag — Manage Palette will offer it as the current version. To upgrade:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">cd ~\u002F.node-red\nnpm install node-red-contrib-telegrambot@latest\nnode-red-restart\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Requires Node.js &gt;= 20. To roll back to V17: \u003Ccode>npm install node-red-contrib-telegrambot@17.4.17\u003C\u002Fcode>.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch1 id=\"thanks-for-your-donation\">\u003Ca class=\"header-anchor\" href=\"#thanks-for-your-donation\">Thanks for your donation\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>If you want to support this free project. Any help is welcome. You can donate by clicking one of the following links:\n\u003Ca target=\"blank\" href=\"https:\u002F\u002Fblockchain.com\u002Fbtc\u002Fpayment_request?address=1PBi7BoZ1mBLQx4ePbwh1MVoK2RaoiDsp5\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDonate-Bitcoin-green.svg\" \u002F>\u003C\u002Fa>\n\u003Ca target=\"blank\" href=\"https:\u002F\u002Fwww.paypal.me\u002Fwindkh\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDonate-PayPal-blue.svg\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fwindka\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fdefault-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch1 id=\"credits\">\u003Ca class=\"header-anchor\" href=\"#credits\">Credits\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cul>\n\u003Cli>dvv (Vladimir Dronnikov): for providing the saveDataDir configuration option\u003C\u002Fli>\n\u003Cli>snippet-java: for adding venue messages and for providing the markdown problem fallback\u003C\u002Fli>\n\u003Cli>greenstone7: for providing the callback query node\u003C\u002Fli>\n\u003Cli>dceejay: for cleaning up the project\u003C\u002Fli>\n\u003Cli>psyntium: for providing the weblink for additional content link videos, pictures, animations, audio files\u003C\u002Fli>\n\u003Cli>MatthiasHunziker: for extending the callback query node to support generic events\u003C\u002Fli>\n\u003Cli>Skiepp: for providing the send chat action idea.\u003C\u002Fli>\n\u003Cli>MK-2001: for providing the sendMediaGroup fuhttps:\u002F\u002Fgithub.com\u002Fyagop\u002Fnode-telegram-bot-apinction\u003C\u002Fli>\n\u003Cli>cowchimp: for adding the support for \u003Ccode>Node-RED v1.0+\u003C\u002Fcode> (async)\u003C\u002Fli>\n\u003Cli>JokerQyou: for adding the support for using webhook without certificate\u003C\u002Fli>\n\u003Cli>bonastreyair: for providing ideas for improving the command node\u003C\u002Fli>\n\u003Cli>StephanStS: for extension\u002Fclearification\u002Fbeautification of Readme.md and finding minor bugs\u003C\u002Fli>\n\u003Cli>Diddlik: for extending webhook options\u003C\u002Fli>\n\u003Cli>MorbidDevil: for extending answerInlineQuery with options\u003C\u002Fli>\n\u003Cli>daredoes: for providing the webhook decumentation on Unraid\u002FDocker with SWAG\u002FNGINX\u002FREVERSE-PROXY\u003C\u002Fli>\n\u003Cli>kickouille: for fixing the payment functions and providing the full payment example flow\u003C\u002Fli>\n\u003Cli>skrashevich: for providing approveChatJoinRequest, declineChatJoinRequest\u003C\u002Fli>\n\u003Cli>ShotokanZH: for providing the web app data example\u003C\u002Fli>\n\u003Cli>Dodoooh: for providing the send to topic example flow\u003C\u002Fli>\n\u003Cli>MariusSchiffer: for improving documentation\u003C\u002Fli>\n\u003Cli>ptath: for providing pullrequest for setChatAdministratorCustomTitle\u003C\u002Fli>\n\u003Cli>gmag11: for providing pullrequest for enhancing getFile\u003C\u002Fli>\n\u003Cli>ivanjh: for providing the patch for improving output of polling errors\u003C\u002Fli>\n\u003Cli>GrimbiXcode: for replacing pump with pipeline\u003C\u002Fli>\n\u003Cli>y8: for providing ideas for improving receiver node\u003C\u002Fli>\n\u003Cli>ptath: for providing setChatMemberTag\u003C\u002Fli>\n\u003Cli>MK-2001: for providing pullrequest with safe stringify\u003C\u002Fli>\n\u003Cli>gtalusan: for providing pullrequest with handlers for promise rejections when offline\u003C\u002Fli>\n\u003Cli>ajanulis: for fixing the redeploy \"Close timed out\" hang in polling mode\u003C\u002Fli>\n\u003Cli>petermeter69: for the detailed long-running testing and logs behind the polling-recovery fix (#442)\u003C\u002Fli>\n\u003Cli>Alexey-Tsarev: for fixing the SOCKS proxy port coercion under V18 (#472)\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch1 id=\"-contributors\">\u003Ca class=\"header-anchor\" href=\"#-contributors\">👥 Contributors\u003C\u002Fa>\u003C\u002Fh1>\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fgraphs\u002Fcontributors\">\n      \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=windkh\u002Fnode-red-contrib-telegrambot\" \u002F>\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003Ch1 id=\"installation\">\u003Ca class=\"header-anchor\" href=\"#installation\">Installation\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fnodei.co\u002Fnpm\u002Fnode-red-contrib-telegrambot\u002F\">\u003Cimg src=\"https:\u002F\u002Fnodei.co\u002Fnpm\u002Fnode-red-contrib-telegrambot.png?downloads=true\" alt=\"NPM\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>You can install the nodes using node-red's \"Manage palette\" in the side bar.\u003C\u002Fp>\n\u003Cp>Or run the following command in the root directory of your Node-RED installation\u003C\u002Fp>\n\u003Cpre>\u003Ccode>npm install node-red-contrib-telegrambot --save\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Note that the minimum node-red version 1.3.7 and minimum nodejs version is 12.x.\u003C\u002Fp>\n\u003Ch1 id=\"dependencies\">\u003Ca class=\"header-anchor\" href=\"#dependencies\">Dependencies\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>The nodes are tested with \u003Ccode>Node.js v18.20.0\u003C\u002Fcode> and \u003Ccode>Node-RED v3.1.9\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fyagop\u002Fnode-telegram-bot-api\">node-telegram-bot-api\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fsocks-proxy-agent\">socks-proxy-agent\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch1 id=\"changelog\">\u003Ca class=\"header-anchor\" href=\"#changelog\">Changelog\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>Changes can be followed \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002FCHANGELOG.md\">here\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch1 id=\"hints\">\u003Ca class=\"header-anchor\" href=\"#hints\">Hints\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cul>\n\u003Cli>It is recommended to always do a full deploy when you changed some of the nodes of this library to prevent unexpected behavior.\u003C\u002Fli>\n\u003Cli>Do not use a token in more than one configuration node at the same time as the telegram server does not allow multiple connections for one bot.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch1 id=\"usage\">\u003Ca class=\"header-anchor\" href=\"#usage\">Usage\u003C\u002Fa>\u003C\u002Fh1>\n\u003Ch2 id=\"basics\">\u003Ca class=\"header-anchor\" href=\"#basics\">Basics\u003C\u002Fa>\u003C\u002Fh2>\n\u003Ch3 id=\"receiver-and-sender-nodes\">\u003Ca class=\"header-anchor\" href=\"#receiver-and-sender-nodes\">Receiver and sender nodes\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The \u003Cem>Telegram receiver\u003C\u002Fem> node receives messages from the bot and sends a message object with the following layout:\u003C\u002Fp>\n\u003Cp>\u003Ccode>msg.payload\u003C\u002Fcode> contains the message details with the following elements:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cem>\u003Cstrong>chatId\u003C\u002Fstrong>\u003C\u002Fem> : The unique id of the chat. This value needs to be passed to the out node when responding to the same chat\u003C\u002Fli>\n\u003Cli>\u003Cem>\u003Cstrong>type\u003C\u002Fstrong>\u003C\u002Fem> : The type of message received. Types see table below\u003C\u002Fli>\n\u003Cli>\u003Cem>\u003Cstrong>content\u003C\u002Fstrong>\u003C\u002Fem> : Received message content: String or file_id, or object with full data (location, contact)\u003C\u002Fli>\n\u003Cli>Additional:\u003C\u002Fli>\n\u003Cli>\u003Cem>\u003Cstrong>date\u003C\u002Fstrong>\u003C\u002Fem> (Optional element): Date the message was sent in Unix time (integer)\u003C\u002Fli>\n\u003Cli>\u003Cstrong>further elements\u003C\u002Fstrong> depending on the \u003Cem>type\u003C\u002Fem> (see table below)\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Ccode>msg.originalMessage\u003C\u002Fcode> contains the original message object from the underlying \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fyagop\u002Fnode-telegram-bot-api\">\u003Cstrong>node-telegram-bot-api\u003C\u002Fstrong>\u003C\u002Fa> lib.\u003C\u002Fp>\n\u003Cp>\u003Ccode>msg.telegramBot\u003C\u002Fcode> contains the bot details object which can be used inside the flow to find out what bot received the message`.\u003C\u002Fp>\n\u003Cp>The \u003Cem>Telegram sender\u003C\u002Fem> node sends the content to a specified username or chat. The node's input \u003Ccode>msg\u003C\u002Fcode> object is similar to the output \u003Ccode>msg\u003C\u002Fcode> object of the \u003Cem>Telegram receiver\u003C\u002Fem> node. Some of the additional elements are mandatory and some are optional (see table below).\u003C\u002Fp>\n\u003Cp>A simple echo flow looks like:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotEcho.png?raw=true\" alt=\"Alt text\" title=\"Echo Flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fecho.json\">\u003Cstrong>echo flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 1:\u003C\u002Fstrong> Simple echo flow\u003C\u002Fp>\n\u003Ch3 id=\"types-of-telegram-messages\">\u003Ca class=\"header-anchor\" href=\"#types-of-telegram-messages\">Types of telegram messages\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The following message contents can be sent and received (given in \u003Ccode>msg.payload.type\u003C\u002Fcode>):\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>message\u003C\u002Fstrong> - content is text\u003C\u002Fli>\n\u003Cli>\u003Cstrong>photo\u003C\u002Fstrong> - content is the file_id of the photo with the highest resolution\u003C\u002Fli>\n\u003Cli>\u003Cstrong>audio\u003C\u002Fstrong> - content is the file_id of the audio file\u003C\u002Fli>\n\u003Cli>\u003Cstrong>document\u003C\u002Fstrong> - content is the file_id of the document\u003C\u002Fli>\n\u003Cli>\u003Cstrong>sticker\u003C\u002Fstrong> - content is the file_id of the sticker\u003C\u002Fli>\n\u003Cli>\u003Cstrong>animation\u003C\u002Fstrong> - content is the file_id of the animation file\u003C\u002Fli>\n\u003Cli>\u003Cstrong>dice\u003C\u002Fstrong> - content is a dice\u003C\u002Fli>\n\u003Cli>\u003Cstrong>video\u003C\u002Fstrong> - content is the file_id of the video file\u003C\u002Fli>\n\u003Cli>\u003Cstrong>video_note\u003C\u002Fstrong> - content is the file_id of the video note file\u003C\u002Fli>\n\u003Cli>\u003Cstrong>voice\u003C\u002Fstrong> - content is the file_id of the voice file\u003C\u002Fli>\n\u003Cli>\u003Cstrong>location\u003C\u002Fstrong> - content is an object with latitude and longitude\u003C\u002Fli>\n\u003Cli>\u003Cstrong>venue\u003C\u002Fstrong> - content is the venue object\u003C\u002Fli>\n\u003Cli>\u003Cstrong>contact\u003C\u002Fstrong> - content is the contact information object\u003C\u002Fli>\n\u003Cli>\u003Cstrong>poll\u003C\u002Fstrong> - content is a poll object\u003C\u002Fli>\n\u003Cli>\u003Cstrong>invoice\u003C\u002Fstrong> - content is an invoice for a payment\u003C\u002Fli>\n\u003Cli>\u003Cstrong>successful_payment\u003C\u002Fstrong> - content is a service message about a successful payment\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Note that media groups are sent\u002Freceived not as a group, but as separate messages of type photo and video.\u003C\u002Fp>\n\u003Cp>The following \u003Ccode>msg.payload.type\u003C\u002Fcode> contents indicate changes in the group or channel itself:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>new_chat_title\u003C\u002Fstrong> - content is the new chat title\u003C\u002Fli>\n\u003Cli>\u003Cstrong>new_chat_photo\u003C\u002Fstrong> - content is the file_id (see photo)\u003C\u002Fli>\n\u003Cli>\u003Cstrong>new_chat_members\u003C\u002Fstrong> - content is an array of new chat members\u003C\u002Fli>\n\u003Cli>\u003Cstrong>left_chat_member\u003C\u002Fstrong> - content is an object describing the chat member that left\u003C\u002Fli>\n\u003Cli>\u003Cstrong>delete_chat_photo\u003C\u002Fstrong> - content is true\u003C\u002Fli>\n\u003Cli>\u003Cstrong>pinned_message\u003C\u002Fstrong> - content is the pinned message object\u003C\u002Fli>\n\u003Cli>\u003Cstrong>channel_chat_created\u003C\u002Fstrong> - content is true\u003C\u002Fli>\n\u003Cli>\u003Cstrong>group_chat_created\u003C\u002Fstrong> - content is true\u003C\u002Fli>\n\u003Cli>\u003Cstrong>supergroup_chat_created\u003C\u002Fstrong> - content is true\u003C\u002Fli>\n\u003Cli>\u003Cstrong>migrate_from_chat_id\u003C\u002Fstrong> - content is the chat id. The chat property describes the chat.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>migrate_to_chat_id\u003C\u002Fstrong> - content is the chat id. The chat property describes the chat.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>For more details of the content types listed above also refer to the \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#available-types\">\u003Cstrong>telegram api description\u003C\u002Fstrong>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3 id=\"message-types-and-corresponding-content-elements-in-msgpayload\">\u003Ca class=\"header-anchor\" href=\"#message-types-and-corresponding-content-elements-in-msgpayload\">Message types and corresponding \u003Cem>content\u003C\u002Fem> elements in \u003Ccode>msg.payload\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The \u003Ccode>msg.payload\u003C\u002Fcode> contains several elements additional to \u003Cem>chatId\u003C\u002Fem>, \u003Cem>type\u003C\u002Fem> and \u003Cem>content\u003C\u002Fem>. These additional elements depend on the contents of \u003Ccode>msg.payload.type\u003C\u002Fcode>. In addition the format of \u003Ccode>msg.payload.content\u003C\u002Fcode> depends on the \u003Cem>type\u003C\u002Fem>.\u003C\u002Fp>\n\u003Cp>The following table shows the relationship between the message \u003Cem>type\u003C\u002Fem> and additional elements.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>\u003Cem>msg.payload.type\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>msg.payload.content\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>chat\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>caption\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>blob\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>photos\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>mediaGroupId\u003C\u002Fem>\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>message\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>text\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>photo\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>photo[index].file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>+\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>audio\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>audio.file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>dice\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>dice\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>false\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>sticker\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>sticker.file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>animation\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>animation.file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>video\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>video.file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>video_note\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>video_note.file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>voice\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>voice.file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>location\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>location\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>venue\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>venue\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>contact\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>contact\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>document\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>document.file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>poll\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>poll\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>invoice\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>invoice\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>successful_payment\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>successful_payment\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>new_chat_title\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>new_chat_title\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>new_chat_photo\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>new_chat_photo[index].file_id\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>true\u003C\u002Ftd>\n\u003Ctd>+\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>new_chat_members\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>new_chat_members\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>left_chat_member\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>left_chat_members\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>delete_chat_photo\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>delete_chat_photo\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>pinned_message\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>pinned_message\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>channel_chat_created\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>channel_chat_created\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>group_chat_created\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>group_chat_created\u003C\u002Ftd>\n\u003Ctd>+\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>supergroup_chat_created\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>supergroup_chat_created\u003C\u002Ftd>\n\u003Ctd>+\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>migrate_from_chat_id\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>migrate_from_chat_id\u003C\u002Ftd>\n\u003Ctd>+\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>migrate_to_chat_id\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>migrate_to_chat_id\u003C\u002Ftd>\n\u003Ctd>+\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Legend:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>-\u003C\u002Fstrong> : Element is not present in \u003Ccode>msg.payload\u003C\u002Fcode> structure\u003C\u002Fli>\n\u003Cli>\u003Cstrong>+\u003C\u002Fstrong> : Element is mandatory in \u003Ccode>msg.payload\u003C\u002Fcode> structure\u003C\u002Fli>\n\u003Cli>\u003Cstrong>optional\u003C\u002Fstrong> : Element is optional in \u003Cem>Sender\u003C\u002Fem> node and always present in \u003Cem>Receiver\u003C\u002Fem> node\u003C\u002Fli>\n\u003Cli>\u003Cstrong>true\u003C\u002Fstrong> : Element is mandatory and has to be set to boolean value \u003Cem>true\u003C\u002Fem>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Tab. 1:\u003C\u002Fstrong> Data elements in \u003Ccode>msg.payload\u003C\u002Fcode> depending on \u003Ccode>msg.payload.type\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>For more details of the content types listed above also refer to the \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#available-types\">\u003Cstrong>telegram api description\u003C\u002Fstrong>\u003C\u002Fa> and the \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi\">\u003Cstrong>telegram bot api description\u003C\u002Fstrong>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3 id=\"error-handling\">\u003Ca class=\"header-anchor\" href=\"#error-handling\">Error handling\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>There are two ways of how to handle errors in the sender node:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Default: all errors can be handled in a catch-all node.\u003C\u002Fli>\n\u003Cli>Enable second output: errors are sent to this additional output. The msg contains an additional \u003Ccode>msg.error\u003C\u002Fcode> property.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotErrorHandling2.png\" title=\"Sender node dialog\" width=\"600\" \u002F>\n\u003Cp>\u003Cstrong>Fig. 2:\u003C\u002Fstrong> Sender node dialog\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotErrorHandling.png?raw=true\" alt=\"Alt text\" title=\"Error handling in sender node.\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Ferrorhandling.json\">\u003Cstrong>error handling example flow\u003C\u002Fstrong>\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch2 id=\"configuration-node\">\u003Ca class=\"header-anchor\" href=\"#configuration-node\">Configuration Node\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The mandatory configuration entries are\u003C\u002Fp>\n\u003Cul>\n\u003Cli>the \u003Cem>Bot-Name\u003C\u002Fem> and\u003C\u002Fli>\n\u003Cli>the \u003Cem>Token\u003C\u002Fem>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>which you received from @botfather when creating a new bot.\u003C\u002Fp>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotConfigurationNodeDialog.png\" title=\"Configuration node dialog\" width=\"600\" \u002F>\n\u003Cp>\u003Cstrong>Fig. 3:\u003C\u002Fstrong> Configuration node dialog\u003C\u002Fp>\n\u003Ch3 id=\"reading-token-from-external-location\">\u003Ca class=\"header-anchor\" href=\"#reading-token-from-external-location\">Reading token from external location\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Instead of entering the token from bot father directly into the token field, you can also instruct the node to read ot from on external location.\u003C\u002Fp>\n\u003Ch4 id=\"reading-token-from-environment-variable\">\u003Ca class=\"header-anchor\" href=\"#reading-token-from-environment-variable\">Reading token from environment variable\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>Environment variables are entered in the settings.js of node-red before startup.\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-javascript\">process.env.BOT_TOKEN = \"&lt;your bot token here&gt;\";\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The token field in the configuration node must then look like\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-javascript\">{env.get(\"BOT_TOKEN\")}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3 id=\"configuration-properties-users-and-chatids\">\u003Ca class=\"header-anchor\" href=\"#configuration-properties-users-and-chatids\">Configuration properties \u003Cem>Users\u003C\u002Fem> and \u003Cem>ChatIds\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The node contains the two optional properties: \u003Cem>\u003Cstrong>Users\u003C\u002Fstrong>\u003C\u002Fem> and \u003Cem>\u003Cstrong>ChatIds\u003C\u002Fstrong>\u003C\u002Fem>. You may enter a list of names and\u002For chatIds that are authorized to use this bot. This is useful, if the bot should only accept incoming calls from dedicated persons resp. chat groups.\nThe values in the property fields must be separated by a comma e.g.:\nHugo,Sepp,Egon\nLeave the fields \u003Cem>Users\u003C\u002Fem> and \u003Cem>ChatIds\u003C\u002Fem> blank if you do not want to use this feature to mask senders.\u003C\u002Fp>\n\u003Cp>User names can only be used, if a telegram user has set its Username in the Telegram settings. The following screenshot shows the according settings dialog in the Telegram app where you can set your personal preferences:\u003C\u002Fp>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramSettingsUsername.png\" title=\"Telegram user name settings\" width=\"350\" \u002F>\n\u003Cp>\u003Cstrong>Fig. 4:\u003C\u002Fstrong> Telegram app settings dialog (example Android phone app)\u003C\u002Fp>\n\u003Cp>If no \u003Cem>Username\u003C\u002Fem> is set you can only filter via the \u003Cem>ChatId\u003C\u002Fem> property.\u003C\u002Fp>\n\u003Ch3 id=\"configuration-property-server-url\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-server-url\">Configuration property \u003Cem>Server URL\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>This is the server url of the telegram server (https:\u002F\u002Fapi.telegram.org). If you use a different instance of a telegram server somewhere else (e.g. on premise) you could then use this property to connect to that server instead the global one.\u003C\u002Fp>\n\u003Cp>Typically this field is left blank.\u003C\u002Fp>\n\u003Ch3 id=\"configuration-property-test-environment\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-test-environment\">Configuration property \u003Cem>Test Environment\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>This enables the test environment see: (https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Ffeatures#testing-your-bot).\u003C\u002Fp>\n\u003Cp>Typically this checkbox is unchecked.\u003C\u002Fp>\n\u003Ch3 id=\"configuration-property-update-mode\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-update-mode\">Configuration property \u003Cem>Update Mode\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The update mode can be chosen from \u003Cem>Polling\u003C\u002Fem> or \u003Cem>Webhook\u003C\u002Fem>.\u003C\u002Fp>\n\u003Ch4 id=\"polling-mode\">\u003Ca class=\"header-anchor\" href=\"#polling-mode\">Polling mode\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>By default the bot is polling every 300ms for new messages. This polling interval can be set via the property \u003Cem>\u003Cstrong>Poll Interval\u003C\u002Fstrong>\u003C\u002Fem> in the Do you mean a table which describes the logic within the function getMessageDetails(botMsg)?\nE.g. a table with these coloumns:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>text: chatId, messageId, type (= \"message\"), content (text)\u003C\u002Fli>\n\u003Cli>photo: chatId, messageId, type (= \"photo\"), content (photo[index].file_id with index = different photo sizes), caption, date, blob (= true), photos (???), mediaGroupId\u003C\u002Fli>\n\u003Cli>audio: chatId, messageId, type (= \"audio\"), content (file_id), cation, date, blob (= true)\n...\u003Cem>Polling Options\u003C\u002Fem>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch4 id=\"webhook-mode\">\u003Ca class=\"header-anchor\" href=\"#webhook-mode\">Webhook mode\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>The \u003Cem>Webhook\u003C\u002Fem> method may be chosen to avoid polling.\u003C\u002Fp>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotWebHookConfiguration.png\" title=\"Webhook configuration with self signed sertificate\" width=\"350\" \u002F>\n\u003Cp>\u003Cstrong>Fig. 5:\u003C\u002Fstrong> Example configuration for webhook mode\u003C\u002Fp>\n\u003Cp>As setting up a webhook can be very complex depending on the infrastructure this was moved to a seprate readme file.\nSee also \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002FWEBHOOK.md\">WEBHOOK.md\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch4 id=\"none-mode\">\u003Ca class=\"header-anchor\" href=\"#none-mode\">None mode\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>The \u003Cem>None\u003C\u002Fem> method may be chosen to avoid traffic due to polling or incoming webhook calls.\nYou can only send messages using the sender node but you can not receive any data.\u003C\u002Fp>\n\u003Ch3 id=\"configuration-property-ip-address-family\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-ip-address-family\">Configuration property \u003Cem>IP address family\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>You can force a certain IP version to be used when making requests to the telegram server.\nNormally this is up to the operating system und you can just keep the default setting \"Any\".\nIf you discover problems e.g. the telegram server is unreachable. Then you can try to force\nusing IPv4 or IPv6.\u003C\u002Fp>\n\u003Ch3 id=\"configuration-property-flag-use-socks\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-flag-use-socks\">Configuration property flag \u003Cem>Use SOCKS\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>SOCKS4\u002F5 proxy support is optional when running behind a SOCKS4\u002F5 proxy that requires authentication. In this case, additional configuration properties have to be set in the configuration node.\u003C\u002Fp>\n\u003Cp>As setting up a socks5 proxy can be very complex depending on the infrastructure this was moved to a seprate readme file.\nSee also \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002FSOCKS5.md\">SOCKS5.md\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch3 id=\"configuration-property-flag-verbose-logging\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-flag-verbose-logging\">Configuration property flag \u003Cem>Verbose Logging\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The \u003Cem>\u003Cstrong>Verbose Logging\u003C\u002Fstrong>\u003C\u002Fem> flag should only be activated when debugging network problems as this will create cyclic warnings when the network is down.\u003C\u002Fp>\n\u003Ch2 id=\"receiver-node\">\u003Ca class=\"header-anchor\" href=\"#receiver-node\">Receiver Node\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>This node can \u003Cstrong>receive telegram messages\u003C\u002Fstrong> sent to the bot and (under certain circumstances) also \u003Cstrong>receive messages from a chat\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotNodeReceiver.png\" alt=\"node-appearance-receiver\" title=\"Receiver node appearance\" \u002F>\u003Cbr \u002F>\n\u003Cstrong>Fig. 6:\u003C\u002Fstrong> Receiver node appearance\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Telegram messages\u003C\u002Fstrong> sent directly to the bot are automatically received (if not masked via the configuration node property \u003Cem>Users\u003C\u002Fem>).\u003Cbr \u002F>\nTo be able to receive \u003Cstrong>telegram chat messages\u003C\u002Fstrong>, invite the bot to a chat (\u002Fsetprivacy must be configured correctly!). If the configuration node property \u003Cem>ChatIds\u003C\u002Fem> is not set, all chat messages are received.\u003C\u002Fp>\n\u003Cp>You can control if the bot receives every message by calling \u003Cstrong>\u002Fsetprivacy @botfather\u003C\u002Fstrong> (refer also to \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Ffeatures#privacy-mode\">\u003Cstrong>there\u003C\u002Fstrong>\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cp>Note that there are certain limitations for bots in channels, groups and super groups. You should make the bot admin or grant the rights if you discover problems. Bot to bot communication is also not allowed by telegram. Please read the telegram bot documentation.\u003C\u002Fp>\n\u003Ch3 id=\"configuration\">\u003Ca class=\"header-anchor\" href=\"#configuration\">Configuration\u003C\u002Fa>\u003C\u002Fh3>\n\u003Ch4 id=\"configuration-property-download-directory\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-download-directory\">Configuration property \u003Cem>Download Directory\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>When the receiver node receives data like videos, documents and so on, the file is downloaded automatically to the local harddisc when the node's property \u003Cem>\u003Cstrong>Download Directory\u003C\u002Fstrong>\u003C\u002Fem> is set in the configuration node. The directory may also be part of the message payload: \u003Ccode>msg.payload.path\u003C\u002Fcode>.\nIn addition to that the message object may contain the direct download link in the payload: \u003Ccode>msg.payload.weblink\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch4 id=\"configuration-property-events\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-events\">Configuration property \u003Cem>Events\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>Next to messages the bot receives a number of events which can be received using the event node. By activating this flag all events are handled by the receiver node, too.\u003C\u002Fp>\n\u003Ch4 id=\"configuration-property-filter\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-filter\">Configuration property \u003Cem>Filter\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>Normally, a receiver node receives all content that is sent to the bot. However if you have command nodes next to a receiver you can enable the \u003Cem>commands\u003C\u002Fem> flag in the configuration property \u003Cem>\u003Cstrong>Filter\u003C\u002Fstrong>\u003C\u002Fem> so that commands meant for a command node will not be handled by the receiver node.\u003Cbr \u002F>\nI.e. the command message then only appears in the configured command node and not in this node.\u003C\u002Fp>\n\u003Ch4 id=\"configuration-property-message-input\">\u003Ca class=\"header-anchor\" href=\"#configuration-property-message-input\">Configuration property \u003Cem>Message Input\u003C\u002Fem>\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>Enable this checkbox if you want to receive updates from telegram using an external source (like http node, mqtt). The format must match the one provided by telegram. It is recommended to disable webhook and polling in config node when providing updates from external sources via this input.\u003C\u002Fp>\n\u003Cp>See the example flow \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fexternalreceiverl.json\">\u003Cstrong>control bot\u003C\u002Fstrong>\u003C\u002Fa> in the examples folder.\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>message\u003C\u002Fem> example\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">{\n  update_id: 276165414,\n  message: {\n    message_id: 6196,\n    from: {\n      id: 1234,\n      is_bot: false,\n      first_name: \"Bigfoot\",\n      last_name: \"VLOG\",\n      username: \"Bigfoot\",\n      language_code: \"de\",\n    },\n    chat: {\n      id: 1234,\n      first_name: \"Bigfoot\",\n      last_name: \"VLOG\",\n      username: \"Bigfoot\",\n      type: \"private\",\n    },\n    date: 1763891508,\n    text: \"Hello guys!\",\n  },\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cp>See the example flow \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fexternalreceiver2.json\">\u003Cstrong>control bot\u003C\u002Fstrong>\u003C\u002Fa> in the examples folder.\u003C\u002Fp>\n\u003Ch3 id=\"outputs\">\u003Ca class=\"header-anchor\" href=\"#outputs\">Outputs\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The original message from the underlying node library is stored in \u003Ccode>msg.originalMessage\u003C\u002Fcode>. The \u003Ccode>msg.payload\u003C\u002Fcode> contains the most important data like \u003Cstrong>chatId\u003C\u002Fstrong>, \u003Cstrong>type\u003C\u002Fstrong> and \u003Cstrong>content\u003C\u002Fstrong>. Additional elements are present in the \u003Ccode>msg.payload\u003C\u002Fcode> structure and depend on the message \u003Cem>type\u003C\u002Fem>. These additional elements are described in the table \u003Cstrong>Tab. 1\u003C\u002Fstrong> above.\u003C\u002Fp>\n\u003Cp>The content format depends on the message type. E.g. if you receive a text message then the content format is a string, if you receive a location, the content format is an object containing latitude and longitude. See also \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#available-methods\">\"available methods\" in the api core description\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>The node has two outputs:\u003C\u002Fp>\n\u003Col>\n\u003Cli>The node's upper output (\u003Cem>\u003Cstrong>Standard Output\u003C\u002Fstrong>\u003C\u002Fem>) is used if the message is from an authorized user.\u003C\u002Fli>\n\u003Cli>The node's lower output (\u003Cem>\u003Cstrong>Unauthorized Output\u003C\u002Fstrong>\u003C\u002Fem>) is used when security is applied (via configuration properties \u003Cem>Users\u003C\u002Fem> and \u003Cem>ChatIds\u003C\u002Fem>) and the user is not authorized to access the bot.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2 id=\"sender-node\">\u003Ca class=\"header-anchor\" href=\"#sender-node\">Sender Node\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>This node \u003Cstrong>sends contents\u003C\u002Fstrong> to a telegram user or to a telegram chat. It is triggered by an incoming \u003Ccode>msg\u003C\u002Fcode> object at its input containing all necessary telegram information.\u003Cbr \u002F>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotNodeSender.png\" alt=\"node-appearance-sender\" title=\"Sender node appearance\" \u002F>\u003Cbr \u002F>\n\u003Cstrong>Fig. 7:\u003C\u002Fstrong> Sender node appearance\u003C\u002Fp>\n\u003Ch3 id=\"inputs\">\u003Ca class=\"header-anchor\" href=\"#inputs\">Inputs\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The input \u003Ccode>msg.payload\u003C\u002Fcode> must contain the following elements:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>msg.payload.chatId\u003C\u002Fcode>  - \u003Cstrong>chatId\u003C\u002Fstrong> or an \u003Cstrong>array of chatIds\u003C\u002Fstrong> if you want to send the same message to several chats\u003C\u002Fli>\n\u003Cli>\u003Ccode>msg.payload.type\u003C\u002Fcode>    - e.g. \u003Cstrong>message\u003C\u002Fstrong>, \u003Cstrong>document\u003C\u002Fstrong>, \u003Cstrong>photo\u003C\u002Fstrong>, etc. (see section \u003Cem>Receiver Node\u003C\u002Fem> above)\u003C\u002Fli>\n\u003Cli>\u003Ccode>msg.payload.content\u003C\u002Fcode> - your message content (e.g. message text)\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Additional elements are present in the \u003Ccode>msg.payload\u003C\u002Fcode> structure and depend on the message \u003Cem>type\u003C\u002Fem>. These additional elements are described in the table \u003Cstrong>Tab. 1\u003C\u002Fstrong> above.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>\u003Cem>msg.payload.type\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>msg.payload.content\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>msg.payload.options\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>see also\u003C\u002Fem>\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>message\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>text (string)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendmessage\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>document\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>document (InputFile\u002Fstring)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#senddocument\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>photo\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>photo (InputFile\u002Fstring)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendphoto\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>audio\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>audio (InputFile\u002Fstring)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendaudio\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>video\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>video (InputFile\u002Fstring)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendvideo\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>animation\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>animation (InputFile\u002Fstring)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendanimation\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>voice\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>voice (InputFile\u002Fstring)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendvoice\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>video_note\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>video_note (InputFile\u002Fstring)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendvideonote\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>mediaGroup\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>media (array of InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendmediagroup\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>poll\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>sticker\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>sticker (InputFile\u002Fstring)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendsticker\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>dice\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#senddice\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>venue\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendvenue\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>contact\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendcontact\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>The content format depends on the message type. E.g. if you send a text message then the content format is a string, if you send a location, the content format is an object containing latitude and longitude. See also \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#available-methods\">\"available methods\" in the api core description\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3 id=\"outputs-1\">\u003Ca class=\"header-anchor\" href=\"#outputs-1\">Outputs\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Basically the input \u003Ccode>msg\u003C\u002Fcode> object is forwarded unchanged to the node's output.\u003C\u002Fp>\n\u003Cp>The node has up to two outputs (selectable via the \u003Cem>Send errors to second output\u003C\u002Fem> flag):\u003C\u002Fp>\n\u003Col>\n\u003Cli>The node's first\u002Fupper output (\u003Cem>\u003Cstrong>Standard Output\u003C\u002Fstrong>\u003C\u002Fem>) is used if the message was successfully transmitted.\u003C\u002Fli>\n\u003Cli>The node's second\u002Flower output (\u003Cem>\u003Cstrong>Error Output\u003C\u002Fstrong>\u003C\u002Fem>) is used when an exception occured. The output \u003Ccode>msg\u003C\u002Fcode> object contains a string property \u003Ccode>msg.error\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch3 id=\"issueing-api-commands\">\u003Ca class=\"header-anchor\" href=\"#issueing-api-commands\">Issueing API commands\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Additionally to sending content, the sender node can be used to issue commands direct to the API. In this case the \u003Ccode>msg.payload\u003C\u002Fcode> elements contain (see examples for further details):\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>msg.payload.type\u003C\u002Fcode> - one of the commands listed below\u003C\u002Fli>\n\u003Cli>\u003Ccode>msg.payload.content\u003C\u002Fcode> - required command arguments\u003C\u002Fli>\n\u003Cli>\u003Ccode>msg.payload.chatId\u003C\u002Fcode> - chatId if required\u003C\u002Fli>\n\u003Cli>\u003Ccode>msg.payload.options\u003C\u002Fcode> (optional) - additional command arguments\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The \u003Ccode>msg.payload.type\u003C\u002Fcode> needs to be set to one of the following values:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>\u003Cem>msg.payload.type\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>msg.payload.content\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>msg.payload.options\u003C\u002Fem>\u003C\u002Fth>\n\u003Cth>\u003Cem>see also\u003C\u002Fem>\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>editMessageCaption\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#editmessagecaption\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>editMessageText\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>text (string)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#editmessagetext\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>editMessageReplyMarkup\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#editmessagereplymarkup\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>editMessageMedia\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>media (InputMedia)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#editmessagemedia\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>deleteMessage\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_id (integer)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#deletemessage\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setMessageReaction\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_id (integer)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setmessagereaction\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>editMessageLiveLocation\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#editmessagelivelocation\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>stopMessageLiveLocation\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#stopmessagelivelocation\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>callback_query\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>url (string)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answercallbackquery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>answerCallbackQuery\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>url (string)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answercallbackquery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>inline_query\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003Cem>(top-level, not under content)\u003C\u002Fem> \u003Ccode>msg.payload.inlineQueryId\u003C\u002Fcode> (string) + \u003Ccode>msg.payload.results\u003C\u002Fcode> (array of InlineQueryResult)\u003C\u002Ftd>\n\u003Ctd>other answerInlineQuery args: \u003Ccode>button\u003C\u002Fcode>, \u003Ccode>cache_time\u003C\u002Fcode>, \u003Ccode>is_personal\u003C\u002Fcode>, \u003Ccode>next_offset\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answerinlinequery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>answerInlineQuery\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003Cem>(top-level, not under content)\u003C\u002Fem> \u003Ccode>msg.payload.inlineQueryId\u003C\u002Fcode> (string) + \u003Ccode>msg.payload.results\u003C\u002Fcode> (array of InlineQueryResult)\u003C\u002Ftd>\n\u003Ctd>other answerInlineQuery args: \u003Ccode>button\u003C\u002Fcode>, \u003Ccode>cache_time\u003C\u002Fcode>, \u003Ccode>is_personal\u003C\u002Fcode>, \u003Ccode>next_offset\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answerinlinequery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>answerWebAppQuery\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answerwebappquery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>action\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>action (string)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendchataction\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>sendChatAction\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>action (string)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendchataction\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>leaveChat\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#leavechat\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>exportChatInviteLink\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#exportchatinvitelink\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>createChatInviteLink\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#createchatinvitelink\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>banChatMember\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#banchatmember\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>unbanChatMember\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#unbanchatmember\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>restrictChatMember\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#restrictchatmember\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>promoteChatMember\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#promotechatmember\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setChatAdministratorCustomTitle\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>custom title as string\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setchatadministratorcustomtitle\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setChatMemberTag\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>tag as string\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setchatmembertag\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setChatPhoto\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>photo (InputFile)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setchatphoto\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setChatTitle\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>title (string)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setchattitle\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setChatDescription\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>description (string)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setchatdescription\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setChatMenuButton\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>menue button (MenuButton)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setchatmenubutton\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setChatStickerSet\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>sticker set name (string)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setchatstickerset\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>deleteChatStickerSet\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#deleteChatStickerSet\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>pinChatMessage\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_id (integer)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#pinchatmessage\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>unpinChatMessage\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#unpinchatmessage\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>unpinAllChatMessages\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#unpinallchatmessages\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>deleteChatPhoto\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#deletechatphoto\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>getChatAdministrators\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#getchatadministrators\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>getChatMemberCount\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#getchatmembercount\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>getChat\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#getchat\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>getChatMember\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#getchatmember\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>approveChatJoinRequest\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#approvechatjoinrequest\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>declineChatJoinRequest\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>user_id (integer)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#declinechatjoinrequest\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>sendInvoice\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#sendinvoice\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>answerPreCheckoutQuery\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answerprecheckoutquery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>pre_checkout_query\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answerprecheckoutquery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>shipping_query\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answershippingquery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>answerShippingQuery\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#answershippingquery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>getForumTopicIconStickers\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#getforumtopiciconstickers\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>getChatMenuButton\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#getchatmenubutton\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>createForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>name (string)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#createforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>editForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_thread_id (integer)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#editforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>closeForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_thread_id (integer)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#closeforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>reopenForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_thread_id (integer)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#reopenforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>deleteForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_thread_id (integer)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#deleteforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>editGeneralForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>name (string)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#editgeneralforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>unpinAllForumTopicMessages\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>name (string)\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#unpinallforumtopicmessages\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>closeGeneralForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#closegeneralforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>reopenGeneralForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#reopengeneralforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>hideGeneralForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#hidegeneralforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>unhideGeneralForumTopic\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>-\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#unhidegeneralforumtopic\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>stopPoll\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_id (integer)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#stoppoll\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>setChatAdministratorCustomTitle\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>message_id (integer)\u003C\u002Ftd>\n\u003Ctd>optional arguments\u003C\u002Ftd>\n\u003Ctd>https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#setchatadministratorcustomtitle\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>The content format of the command arguments (required and optional) depends on the api command.\u003Cbr \u002F>\nSee also \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#available-methods\">\"available methods\" in the api core description\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3 id=\"calling-the-raw-bot-api-callapi\">\u003Ca class=\"header-anchor\" href=\"#calling-the-raw-bot-api-callapi\">Calling the raw Bot API (\u003Ccode>callApi\u003C\u002Fcode>)\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The sender node only wires up dedicated \u003Ccode>msg.payload.type\u003C\u002Fcode> values for the most common methods (see the tables above). The underlying \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fyagop\u002Fnode-telegram-bot-api\">\u003Ccode>node-telegram-bot-api\u003C\u002Fcode>\u003C\u002Fa> library, however, exposes the \u003Cstrong>complete\u003C\u002Fstrong> Telegram Bot API surface — including methods that do not have a dedicated type yet (e.g. \u003Ccode>setMyCommands\u003C\u002Fcode>, \u003Ccode>createInvoiceLink\u003C\u002Fcode>, \u003Ccode>refundStarPayment\u003C\u002Fcode>, \u003Ccode>forwardMessages\u003C\u002Fcode>, and the newer gifts \u002F stars \u002F business-account methods).\u003C\u002Fp>\n\u003Cp>To reach any of those without waiting for a dedicated type, set \u003Ccode>msg.payload.type\u003C\u002Fcode> to \u003Cstrong>\u003Ccode>callApi\u003C\u002Fcode>\u003C\u002Fstrong> and provide:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>msg.payload.method\u003C\u002Fcode> (string, required) — the library method name, e.g. \u003Ccode>setMyCommands\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Ccode>msg.payload.args\u003C\u002Fcode> (array, optional) — the positional arguments passed to that method, \u003Cstrong>in order\u003C\u002Fstrong>. Defaults to \u003Ccode>[]\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Ccode>msg.payload.chatId\u003C\u002Fcode> (optional) — only used to order this call in the per-chat send queue; it is \u003Cstrong>not\u003C\u002Fstrong> passed to the method. If the method needs a chat id, put it into \u003Ccode>args\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The node invokes \u003Ccode>bot[method](...args)\u003C\u002Fcode> and forwards the return value on \u003Ccode>msg.payload.content\u003C\u002Fcode>. Errors are handled exactly like any other send (retry on flooding \u002F connection loss, error output otherwise).\u003C\u002Fp>\n\u003Cp>Example — register the bot's command menu (\u003Ccode>setMyCommands(commands, options)\u003C\u002Fcode>):\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  \"payload\": {\n    \"type\": \"callApi\",\n    \"method\": \"setMyCommands\",\n    \"args\": [\n      [\n        { \"command\": \"help\",  \"description\": \"Show help\" },\n        { \"command\": \"start\", \"description\": \"Start the bot\" }\n      ],\n      {}\n    ]\n  }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Example — create a shareable payment link (\u003Ccode>createInvoiceLink(title, description, payload, providerToken, currency, prices)\u003C\u002Fcode>):\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  \"payload\": {\n    \"type\": \"callApi\",\n    \"method\": \"createInvoiceLink\",\n    \"args\": [\"My product\", \"A great product\", \"payload-123\", \"PROVIDER_TOKEN\", \"EUR\", [{ \"label\": \"Product\", \"amount\": 999 }]]\n  }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The order and shape of \u003Ccode>args\u003C\u002Fcode> mirror the library method signature exactly — refer to the \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#available-methods\">available methods\u003C\u002Fa> in the Bot API reference.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>\u003Cstrong>Safety:\u003C\u002Fstrong> method names are validated. The connection \u002F polling lifecycle (\u003Ccode>startPolling\u003C\u002Fcode>, \u003Ccode>stopPolling\u003C\u002Fcode>, \u003Ccode>getUpdates\u003C\u002Fcode>, \u003Ccode>setWebHook\u003C\u002Fcode>, \u003Ccode>deleteWebHook\u003C\u002Fcode>, \u003Ccode>logOut\u003C\u002Fcode>, \u003Ccode>close\u003C\u002Fcode>, …), the event-emitter and reply-listener surface (\u003Ccode>on\u003C\u002Fcode>, \u003Ccode>off\u003C\u002Fcode>, \u003Ccode>onText\u003C\u002Fcode>, \u003Ccode>onReplyToMessage\u003C\u002Fcode>, …) and library internals (names starting with \u003Ccode>_\u003C\u002Fcode>) are \u003Cstrong>blocked\u003C\u002Fstrong>, because calling them from a flow would break the node's managed bot instance. Use the \u003Cem>control node\u003C\u002Fem> to start\u002Fstop the bot.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"command-node\">\u003Ca class=\"header-anchor\" href=\"#command-node\">Command Node\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The command node can be used for triggering a message when a specified command is received: e.g. \u002Fhelp. See examples below.\nNote that commands always start with a \u002F like \u002Fhelp, \u002Fstart, \u002Fstop. if you have several bots in one group chat implementing the\nsame command e.g. \u002Fhelp you should send commands directly to a dedicated bot using the full notation \u002Fhelp@YourBot to avoid\nthat different bots would get triggered at once. It it recommended to turn on the strict mode in this case.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotNodeCommand.png\" alt=\"node-appearance-command\" title=\"Command node appearance\" \u002F>\u003Cbr \u002F>\n\u003Cstrong>Fig. 8:\u003C\u002Fstrong> Command node appearance\u003C\u002Fp>\n\u003Ch3 id=\"configuration-1\">\u003Ca class=\"header-anchor\" href=\"#configuration-1\">Configuration\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The node's configuration contains the following special properties:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Command\u003C\u002Fstrong>: The command which shall be implemented.\u003Cbr \u002F>\nCommands usually start with a \u002F like for example \u002Ffoo. According to the telegram api documentation the command should be issued following the bot name like \u002Ffoo@YourBot. This is important when you add several different bots to one single group chat.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Register at telegram server\u003C\u002Fstrong> flag: To automatically register the command and the description at the telegram server.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Description\u003C\u002Fstrong>: The description is used when the command should be published via \u002FsetMyCommands at the telegram server.  \u002F\nIt is optional if the \u003Cstrong>Register at telegram server\u003C\u002Fstrong> flag is not checked.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Language\u003C\u002Fstrong>: The 2 digit language code (see ISO-639-1). If this field is empty it will be shown in every language, otherwise only to the users that have set the language of their client to this language.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Scope\u003C\u002Fstrong>: The scope to register the command to: see also \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#botcommandscope\">BotCommandScope\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Strict in group chats\u003C\u002Fstrong> flag: To avoid that the bot handles commands that are not directly sent to it using the long notation (e.g. \u002Ffoo@YourBot) you can set the \"strict\" mode in the options of the command node. In this case the bot only accepts the full command notation in group chats.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Has response output\u003C\u002Fstrong> flag: This enables the second output (\u003Cem>Unathorized Output\u003C\u002Fem>). Otherwise the node only has one single output.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Use Regex\u003C\u002Fstrong> flag: Allows the usage of regular expressions as command. E.g. ^\u002Ftoggle_ allows all commands starting with \u002Ftoggle_.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Remove Command\u003C\u002Fstrong> flag: This optional flag is used when \u003Cstrong>Use Regex\u003C\u002Fstrong> is checked. If checked it removed the matched command from the beginning of the message. If your command contains addressinformation you should uncheck this flag to be able to parse this information on your own.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"outputs-2\">\u003Ca class=\"header-anchor\" href=\"#outputs-2\">Outputs\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The node has up to two outputs (selectable via the \u003Cem>Has response output\u003C\u002Fem> flag):\u003C\u002Fp>\n\u003Col>\n\u003Cli>The node's first\u002Fupper output (\u003Cem>\u003Cstrong>Standard Output\u003C\u002Fstrong>\u003C\u002Fem>) is used if the message is from an authorized user and it contains a specified command at the beginning of the message.\u003C\u002Fli>\n\u003Cli>The node's second\u002Flower output (\u003Cem>\u003Cstrong>Unauthorized Output\u003C\u002Fstrong>\u003C\u002Fem>) is used in all other cases. This may be the case when security is applied (via configuration properties \u003Cem>Users\u003C\u002Fem> and \u003Cem>ChatIds\u003C\u002Fem>) and the user is not authorized to access the bot or if it is from an autorized user and the message does not contain a specified command.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>The second output is useful when you want to use a keyboard. See example below.\u003Cbr \u002F>\nIt is only issued if a command was received before. If another command was triggered in the meantime, the pending status of the first one is reset. The state is stored per user and per chat.\u003C\u002Fp>\n\u003Ch2 id=\"event-node\">\u003Ca class=\"header-anchor\" href=\"#event-node\">Event Node\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A telegram node that triggers the output when a event is received from a chat.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotNodeEvent.png\" alt=\"node-appearance-event\" title=\"Event node appearance\" \u002F>\u003Cbr \u002F>\n\u003Cstrong>Fig. 9:\u003C\u002Fstrong> Event node appearance\u003C\u002Fp>\n\u003Cp>The node receives events from the bot like:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Callback Query\u003C\u002Fstrong> of inline keyboards. See example-flow \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Finlinekeyboard.json\">inline keyboard flow\u003C\u002Fa> in examples folder.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Inline Query\u003C\u002Fstrong> of inline bots. See \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inline-mode\">Inline mode\u003C\u002Fa> in the bot API.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Edited Message\u003C\u002Fstrong> which is triggered when someone alters an already sent message.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Edited Message Text\u003C\u002Fstrong> which is triggered when someone alters an already sent message text.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Edited Message Caption\u003C\u002Fstrong> which is triggered when someone alters an already sent caption e.g. of a photo.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Channel Post\u003C\u002Fstrong> which is triggered when the bot is member of a public channel (\u002Fsetprivacy to disabled!).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Edited Channel Post\u003C\u002Fstrong> which is triggered when someone alters an already sent message in a public channel.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Edited Channel Post Text\u003C\u002Fstrong> which is triggered when someone alters an already sent message text in a public channel.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Edited Channel Post Caption\u003C\u002Fstrong> which is triggered when someone alters an already sent caption of e.g. a photo in a public channel.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Pre Checkout Query\u003C\u002Fstrong> which is triggered when someone issues a payment (see send invoice).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Shipping Query\u003C\u002Fstrong> which is triggered when someone issues a shipping.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Chosen Inline Result\u003C\u002Fstrong> which is triggered when a user has chosen a result from an inline query.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Poll\u003C\u002Fstrong> which is triggered when a poll is created.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Poll Answer\u003C\u002Fstrong> which is triggered when a poll is answered.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>My Chat Member\u003C\u002Fstrong> which is triggered when the status of the bot is changed.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Chat Join Request\u003C\u002Fstrong> which is triggered when a chat join request is issued.\nNote that - \u003Cstrong>Chat Member\u003C\u002Fstrong> is deactivated as it requires special rights by the bot and modifications in polling.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"configuration-2\">\u003Ca class=\"header-anchor\" href=\"#configuration-2\">Configuration\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The Event to be received is configured via the node's configuration dialog:\u003C\u002Fp>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotConfigurationDialogEvent.png\" title=\"Event node configuration\" width=\"400\" \u002F>\n\u003Cp>\u003Cstrong>Fig. 10:\u003C\u002Fstrong> Event node configuration dialog\u003C\u002Fp>\n\u003Cp>With the \u003Cem>\u003Cstrong>Event\u003C\u002Fstrong>\u003C\u002Fem> property the listening event is selcted.\u003C\u002Fp>\n\u003Cp>The \u003Cem>\u003Cstrong>Auto-Answer\u003C\u002Fstrong>\u003C\u002Fem> checkbox can be set for Callback_Query. If activated, you do not need to send an explicit answer to the bot on your own.\u003C\u002Fp>\n\u003Ch3 id=\"outputs-3\">\u003Ca class=\"header-anchor\" href=\"#outputs-3\">Outputs\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The output \u003Ccode>msg.payload\u003C\u002Fcode> typically contains the parsed data as follows:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cem>\u003Cstrong>chatId:\u003C\u002Fstrong>\u003C\u002Fem> Unique identifier for this chat\u003C\u002Fli>\n\u003Cli>\u003Cem>\u003Cstrong>messageId:\u003C\u002Fstrong>\u003C\u002Fem> Telegram message identifier\u003C\u002Fli>\n\u003Cli>\u003Cem>\u003Cstrong>type:\u003C\u002Fstrong>\u003C\u002Fem> Event type (see configurable events above)\u003C\u002Fli>\n\u003Cli>\u003Cem>\u003Cstrong>date:\u003C\u002Fstrong>\u003C\u002Fem> Timestamp\u003C\u002Fli>\n\u003Cli>\u003Cem>\u003Cstrong>content:\u003C\u002Fstrong>\u003C\u002Fem> The actual UTF-8 text of the message\nOther properties may be present depending on the type of message.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The output \u003Ccode>msg.originalMessage\u003C\u002Fcode> contains the raw data object from the underlying library, and contains many useful properties.\u003C\u002Fp>\n\u003Cp>See also the following descriptions for the event handling:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>callback_query, edited_message, channel_post, edited_channel_post: \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#update\">Getting updates\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>edited_message_text, edited_message_caption: \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#updating-messages\">Updating messages\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>inline_query: \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inline-mode\">Inline mode\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"reply-node\">\u003Ca class=\"header-anchor\" href=\"#reply-node\">Reply Node\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A telegram node that is triggered when someone answered to a specified message.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotNodeReply.png\" alt=\"node-appearance-reply\" title=\"Reply node appearance\" \u002F>\u003Cbr \u002F>\n\u003Cstrong>Fig. 11:\u003C\u002Fstrong> Reply node appearance\u003C\u002Fp>\n\u003Cp>The reply node waits for an answer to a specified message. It should be used in conjunction with the sender node.\u003C\u002Fp>\n\u003Ch3 id=\"input\">\u003Ca class=\"header-anchor\" href=\"#input\">Input\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Standard Input: Calls the \u003Cem>onReplyToMessage\u003C\u002Fem> of the bot.\u003C\u002Fp>\n\u003Ch3 id=\"output\">\u003Ca class=\"header-anchor\" href=\"#output\">Output\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Standard Output: Contains the result from the \u003Cem>onReplyToMessage\u003C\u002Fem> call.\u003C\u002Fp>\n\u003Cp>This node may be useful, when the bot e.g. sent a message and you want to take some action when someone responded to this specified message. Responding to messages is done by clicking on the message in your client and choose \u003Cem>answer\u003C\u002Fem> from the popup.\u003C\u002Fp>\n\u003Cp>The \u003Ccode>msg.payload\u003C\u002Fcode> contains:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>chatId\u003C\u002Fstrong> : Destination chatId\u003C\u002Fli>\n\u003Cli>\u003Cstrong>sentMessageId\u003C\u002Fstrong> : The id of the previously sent message in the chat\u003C\u002Fli>\n\u003Cli>\u003Cstrong>content\u003C\u002Fstrong> : The message content.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"control-node\">\u003Ca class=\"header-anchor\" href=\"#control-node\">Control Node\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>This node can be used to stop, start, restart a bot (config node).\nIt can inject a command message to all command nodes.\nIt can detect if a specified server in the internet can be reached (online\u002Foffline)\nIt send a message to the output after every poll cycle.\nSee the example flow \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fcontrol.json\">\u003Cstrong>control bot\u003C\u002Fstrong>\u003C\u002Fa> in the examples folder.\u003C\u002Fp>\n\u003Ch3 id=\"input-1\">\u003Ca class=\"header-anchor\" href=\"#input-1\">Input\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The \u003Ccode>msg.payload\u003C\u002Fcode> contains:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>command\u003C\u002Fstrong> : 'start' | 'stop' | 'restart' | 'command'\u003C\u002Fli>\n\u003Cli>\u003Cstrong>delay\u003C\u002Fstrong> : Optional delay (between stop and start) in milliseconds for 'restart'.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"output-1\">\u003Ca class=\"header-anchor\" href=\"#output-1\">Output\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Standard Output: Contains the msg object passed to the input or a message with poll information:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>cycle\u003C\u002Fstrong> : Polling cycle number.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>duration\u003C\u002Fstrong> : Duration in milliseconds for the request.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch1 id=\"keyboards\">\u003Ca class=\"header-anchor\" href=\"#keyboards\">Keyboards\u003C\u002Fa>\u003C\u002Fh1>\n\u003Ch2 id=\"general\">\u003Ca class=\"header-anchor\" href=\"#general\">General\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Keyboards can be used to interact with the user by displaying a flexibly definable keyboard. The user then presses one of the keys to give his selection.\u003Cbr \u002F>\nTwo different keyboard types are available:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cem>\u003Cstrong>Custom Keyboards\u003C\u002Fstrong>\u003C\u002Fem> - These are keyboards which replace the standard keyboard. They are located below the message enter area.\u003C\u002Fli>\n\u003Cli>\u003Cem>\u003Cstrong>Inline Keyboards\u003C\u002Fstrong>\u003C\u002Fem> - These are keyboards which are inline in the message area.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A remarkable feature of \u003Cem>Inline Keyboards\u003C\u002Fem> is the ability to change them on the fly. See examples section for further details.\u003C\u002Fp>\n\u003Cp>With keyboards also complex keyboard procedures with several hierarchy levels  can be implemented to direct the user in a step by step button pressing procedure.\u003C\u002Fp>\n\u003Ch2 id=\"custom-keyboards\">\u003Ca class=\"header-anchor\" href=\"#custom-keyboards\">Custom keyboards\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Examples for \u003Cem>Custom keyboards\u003C\u002Fem> can be seen in the \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots#keyboards\">Keyboards section\u003C\u002Fa> of the telegram bot description.\u003C\u002Fp>\n\u003Cp>Custom keyboards act with \u003Cem>\u003Cstrong>message nodes\u003C\u002Fstrong>\u003C\u002Fem> and \u003Cem>\u003Cstrong>telegram receiver nodes\u003C\u002Fstrong>\u003C\u002Fem> to handle the keyboard procedure, which is as follows:\u003C\u002Fp>\n\u003Col>\n\u003Cli>The appearance of the keyboard is initiated via a \u003Cem>message\u003C\u002Fem> sent to the bot. In the message the keyboard configuration is defined within the \u003Ccode>msg.payload.options\u003C\u002Fcode> property.\u003C\u002Fli>\n\u003Cli>The user presses a displayed key.\u003C\u002Fli>\n\u003Cli>The key text is sent back via a \u003Cem>message\u003C\u002Fem>. This message is received with a \u003Cem>receiver node\u003C\u002Fem> and can then be evaluated.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>The keyboard configuration contains the key description, layout and further options. A description of it can be found in the \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#replykeyboardmarkup\">ReplyKeyboardMarkup\u003C\u002Fa> section.\u003Cbr \u002F>\nSee also the custom keyboard example.\u003C\u002Fp>\n\u003Cp>A basic flow handling a custom keyboard with its reply shows the following figure.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotCustomKeyboardBasicFlow.png?raw=true\" alt=\"Alt text\" title=\"Custom keyboard basic flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fbasiccustomkeyboard.json\">\u003Cstrong>custom keyboard basic flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 12:\u003C\u002Fstrong> Custom keyboard basic flow example\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>build keyboard\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">var opts = {\n  reply_markup: JSON.stringify({\n    keyboard: [\n      ['A1'],\n      ['A2']],\n      'resize_keyboard' : true,\n      'one_time_keyboard' : true\n  })\n};\n\n\nmsg.error = false;\n\u002F\u002F Dialogaufbau\nmsg.payload.content = 'Selection?';\nmsg.payload.options = opts;\n\n\nmsg.payload.chatId = 123445;\nmsg.payload.messageId = 99;\nmsg.payload.sentMessageId = 99;\nmsg.payload.type = \"message\";\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cbr \u002F>\n\u003Cp>The look&amp;feel at a mobile device could look like the following figure:\u003C\u002Fp>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotConfirmationMessage4.png\" title=\"Keyboard look@feel\" width=\"300\" \u002F>  \n\u003Cp>\u003Cstrong>Fig. 13:\u003C\u002Fstrong> Custom keyboard example screenshot\u003C\u002Fp>\n\u003Cp>The answering options are located below the user text input field.\u003C\u002Fp>\n\u003Cp>Several options for the keyboard layout can be found there in the \u003Ca href=\"https:\u002F\u002Firazasyed.github.io\u002Ftelegram-bot-sdk\u002Fusage\u002Fkeyboards\u002F\">Telegram Bot API SDK description\u003C\u002Fa>.\u003Cbr \u002F>\nThe keyboard layout shown in Fig. 12 (given in the \u003Cem>create response\u003C\u002Fem> node) is\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-javascript\">keyboard: [\n  ['Yes'],\n  ['No']],\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Another example of a different key layout may be to arrange several keys in one line.\nThis may be like:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-javascript\">keyboard: [\n  ['Yes','No','Maybe'],\n  ['Conditional']],\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This leads to a layout like:\u003C\u002Fp>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotConfirmationMessage5.png\" title=\"Keyboard look@feel\" width=\"300\" \u002F>  \n\u003Cp>\u003Cstrong>Fig. 14:\u003C\u002Fstrong> Custom keyboard example screenshot with different layout\u003C\u002Fp>\n\u003Ch2 id=\"inline-keyboards\">\u003Ca class=\"header-anchor\" href=\"#inline-keyboards\">Inline keyboards\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Examples for \u003Cem>Inline keyboards\u003C\u002Fem> can be seen in the \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots#inline-keyboards-and-on-the-fly-updating\">Inline keyboards section\u003C\u002Fa> of the telegram bot description.\u003C\u002Fp>\n\u003Cp>Inline keyboards act with \u003Cem>\u003Cstrong>message nodes\u003C\u002Fstrong>\u003C\u002Fem> and \u003Cem>\u003Cstrong>event nodes\u003C\u002Fstrong>\u003C\u002Fem> (event \u003Cem>Callback Query\u003C\u002Fem>) to handle the keyboard procedure, which is as follows:\u003C\u002Fp>\n\u003Col>\n\u003Cli>The appearance of the keyboard is initiated via a \u003Cem>message\u003C\u002Fem> sent to the bot. In the message the keyboard configuration is defined within the \u003Ccode>msg.payload.options\u003C\u002Fcode> property.\u003C\u002Fli>\n\u003Cli>The user presses a displayed key.\u003C\u002Fli>\n\u003Cli>The key text is sent back via an \u003Cem>Callback Query\u003C\u002Fem> event. This message is received with an \u003Cem>event node\u003C\u002Fem> and can then be evaluated.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>The keyboard configuration contains the key description, layout and further options. A description of it can be found in the \u003Ca href=\"https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inlinekeyboardmarkup\">InlineKeyboardMarkup\u003C\u002Fa> section.\u003Cbr \u002F>\nSee also the inline keyboard example.\u003C\u002Fp>\n\u003Cp>A basic flow handling an inline keyboard with its reply shows the following figure.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotInlineKeyboardBasicFlow.png?raw=true\" alt=\"Alt text\" title=\"Inline keyboard basic flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fbasicinlinekeyboard.json\">\u003Cstrong>inline keyboard basic flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 15:\u003C\u002Fstrong> Inline keyboard basic flow example\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>build keyboard\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">var opts = {\n  reply_markup: JSON.stringify({\n    \"inline_keyboard\": [[\n                {\n                    \"text\": \"A1\",\n                    \"callback_data\": \"1\"            \n                },\n                {\n                    \"text\": \"A2\",\n                    \"callback_data\": \"2\"            \n                }]\n            ]\n  })\n};\n\nmsg.payload.content = \"Selection?\";\nmsg.payload.options = opts;\nmsg.payload.chatId = 12345;\nmsg.payload.messageId = 99;\nmsg.payload.sentMessageId = 99;\nmsg.payload.type = \"message\";\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cbr \u002F>\n\u003Cp>The look&amp;feel at a mobile device could look like the following figure:\u003C\u002Fp>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotInlineKeyboard4.png\" title=\"Inline keyboard look@feel\" width=\"300\" \u002F>  \n\u003Cp>\u003Cstrong>Fig. 16:\u003C\u002Fstrong> Inline keyboard example screenshot\u003C\u002Fp>\n\u003Cp>The answering options are located within the dialog field.\u003C\u002Fp>\n\u003Cp>Several options for the keyboard layout can be found there in the \u003Ca href=\"https:\u002F\u002Firazasyed.github.io\u002Ftelegram-bot-sdk\u002Fusage\u002Fkeyboards\u002F\">Telegram Bot API SDK description\u003C\u002Fa>.\u003Cbr \u002F>\nThe keyboard layout shown in Fig. 15 (given in the \u003Cem>inline keyboard message\u003C\u002Fem> node) is\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-javascript\">\"inline_keyboard\": [[\n     {\"text\": \"Yes\",\"callback_data\": \"FOO YES\"},\n     {\"text\": \"No\", \"callback_data\": \"FOO NO\"}\n]]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Another example of a different key layout may be to arrange several keys in one line.\nThis may be like:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-javascript\">\"inline_keyboard\": [[\n      {\"text\": \"Yes\",\"callback_data\": \"FOO YES\"},\n      {\"text\": \"No\",\"callback_data\": \"FOO NO\"}],\n    [\n      {\"text\": \"#1\",\"callback_data\": \"FOO ONE\"},\n      {\"text\": \"#2\",\"callback_data\": \"FOO TWO\"},\n      {\"text\": \"#3\",\"callback_data\": \"FOO THREE\"}\n    ],\n    [\n      {\"text\": \"dog\",\"callback_data\": \"FOO DOG\"},\n      {\"text\": \"eel\",\"callback_data\": \"FOO EEL\"},\n      {\"text\": \"cow\",\"callback_data\": \"FOO COW\"},\n      {\"text\": \"cat\",\"callback_data\": \"FOO CAT\"}\n    ]\n]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This leads to a layout like:\u003C\u002Fp>\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotInlineKeyboard5.png\" title=\"Inline keyboard look@feel\" width=\"200\" \u002F>   \n\u003Cp>\u003Cstrong>Fig. 17:\u003C\u002Fstrong> Inline Keyboard example screenshot with different layout\u003C\u002Fp>\n\u003Ch1 id=\"examples\">\u003Ca class=\"header-anchor\" href=\"#examples\">Examples\u003C\u002Fa>\u003C\u002Fh1>\n\u003Chr \u002F>\n\u003Cp>\u003Cstrong>Remark\u003C\u002Fstrong>: Example flows are present in the examples subdirectory. In Node-RED they can be imported via the import function and then selecting \u003Cem>Examples\u003C\u002Fem> in the vertical tab menue.\u003Cbr \u002F>\nAll example flows can also be found in the examples folder of this package.\u003C\u002Fp>\n\u003Chr \u002F>\n\u003Ch2 id=\"implementing-a-simple-echo\">\u003Ca class=\"header-anchor\" href=\"#implementing-a-simple-echo\">Implementing a simple echo\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>This example is self-explaining. The received message is returned to the sender.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotEcho.png?raw=true\" alt=\"Alt text\" title=\"Echo flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fecho.json\">\u003Cstrong>echo flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 18:\u003C\u002Fstrong> Simple echo flow\u003C\u002Fp>\n\u003Ch2 id=\"implementing-a-help-command\">\u003Ca class=\"header-anchor\" href=\"#implementing-a-help-command\">Implementing a \u002Fhelp command\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>This flow returns the help message of your bot. It receives the command and creates a new message, which is returned:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotHelp.png?raw=true\" alt=\"Alt text\" title=\"Help command flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fsendhelpmessage.json\">\u003Cstrong>help message flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 19:\u003C\u002Fstrong> Help command flow example\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>create help text\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">var helpMessage = \"\u002Fhelp - shows help\";\n\nhelpMessage += \"\\r\\n\u002Ffoo - opens a dialog\";\n\nhelpMessage += \"\\r\\n\";\nhelpMessage += \"\\r\\nYou are welcome: \"+msg.originalMessage.from.username;\nhelpMessage += \"\\r\\nYour chat id is \" + msg.payload.chatId;\nhelpMessage += \"\\r\\n\";\n\nmsg.payload.content = helpMessage;\n\nreturn msg;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cbr \u002F>\n\u003Cp>The output looks on a mobile device like the following figure:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotHelp3.png?raw=true\" alt=\"Alt text\" title=\"Help command in telegram\" \u002F>\u003Cbr \u002F>\n\u003Cstrong>Fig. 20:\u003C\u002Fstrong> Help command screenshot\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Note\u003C\u002Fstrong>: You can access the sender's data via the \u003Ccode>msg.originalMessage\u003C\u002Fcode> property.\u003C\u002Fp>\n\u003Ch2 id=\"implementing-a-custom-keyboard\">\u003Ca class=\"header-anchor\" href=\"#implementing-a-custom-keyboard\">Implementing a custom keyboard\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Custom keyboards are very useful for getting additional data from the sender.\nWhen the command is received the first output is triggered and a dialog is opened:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotConfirmationMessage.png?raw=true\" alt=\"Alt text\" title=\"Keyboard flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fkeyboard.json\">\u003Cstrong>keyboard flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 21:\u003C\u002Fstrong> Keyboard example\u003C\u002Fp>\n\u003Cp>The answer is send to the second output triggering the lower flow. Data is passed via global properties here.\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>confirmation message\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">context.global.keyboard = { pending : true };\n\nvar opts = {\n  reply_parameters: { message_id: msg.payload.messageId },\n  reply_markup: JSON.stringify({\n    keyboard: [\n      ['Yes'],\n      ['No']],\n      'resize_keyboard' : true,\n      'one_time_keyboard' : true\n  })\n};\n\nmsg.payload.content = 'Really?';\nmsg.payload.options = opts;\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>create response\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">if (context.global.keyboard.pending) {\n    context.global.keyboard.pending = false;\n\n    if(msg.payload.content === 'Yes') {\n        msg.payload.content = 'Yes';\n        return [msg, null];\n    }\n    else     {\n        msg.payload.content = 'No';\n        return [null, msg];\n    }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Ch2 id=\"implementing-an-on-reply-node\">\u003Ca class=\"header-anchor\" href=\"#implementing-an-on-reply-node\">Implementing an on reply node\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Next to the keyboard the bot could also ask a question and wait for the answer.\nWhen the user responds to a specified message the telegram reply node can be used:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotOnReplyMessage.png?raw=true\" alt=\"Alt text\" title=\"OnReply Flow\" \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Fonreplymessage.json\">\u003Cstrong>onreplymessage flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 22:\u003C\u002Fstrong> On reply example flow\u003C\u002Fp>\n\u003Cp>The question is sent to the chat. This node triggers the on reply node waiting for the answer.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Note\u003C\u002Fstrong>: The user has to explicitly respond to this message. If the user only writes some text,\nthe get reply node will not be triggered.\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>create question\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">msg.payload.type = 'message';\nmsg.payload.content = 'Really?';\nmsg.payload.options = {reply_parameters: { message_id: msg.payload.messageId }}\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>switch answer\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">if(msg.payload.content === 'Yes')\n{\n    return [msg, null];   \n}\nelse\n{\n    return [null, msg];   \n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Ch2 id=\"implementing-an-inline-keyboard\">\u003Ca class=\"header-anchor\" href=\"#implementing-an-inline-keyboard\">Implementing an inline keyboard\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>An inline keyboard contains buttons that can send a callback query back to the bot to trigger any kind of function.\nWhen the command is received the first output is triggered and a inline keyboard is shown:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotInlineKeyboard1.png?raw=true\" alt=\"Alt text\" title=\"Inline Keyboard Flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Finlinekeyboard.json\">\u003Cstrong>inlinekeyboard flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 23:\u003C\u002Fstrong> Inline keyboard example flow\u003C\u002Fp>\n\u003Cp>The callback query is received by the event node. It must be answered like shown as follows.\nThere you can add your code to trigger the desired bot command. The answer contains the callback query data in \u003Ccode>msg.payload.content\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>inline keyboard message\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">var opts = {\n  reply_parameters: { message_id: msg.payload.messageId },\n  reply_markup: JSON.stringify({\n    \"inline_keyboard\": [[\n                {\n                    \"text\": \"Yes\",\n                    \"callback_data\": \"FOO YES\"\n                },\n                {\n                    \"text\": \"No\",\n                    \"callback_data\": \"FOO NO\"\n                }]\n            ]\n  })\n};\n\nmsg.payload.content = 'Are you sure?';\nmsg.payload.options = opts;\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>set answer options\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">var show_alert = false; \u002F\u002F you can set this to true to open a dialog with the answer in the client.\n\n\u002F\u002F msg.payload.content contains the callback data from the keyboard.\n\u002F\u002F You may change this value here.\nmsg.payload.options = show_alert;\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Ch2 id=\"edit-an-inline-keyboard\">\u003Ca class=\"header-anchor\" href=\"#edit-an-inline-keyboard\">Edit an inline keyboard\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>An inline keyboard can be modified using the 'editMessageReplyMarkup' instruction. To be able to modify an existing message you need to know the messageId of the message of the keyboard.\nA sample flow is provided in the examples folder and could look like this:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotEditInlineKeyboard1.png?raw=true\" alt=\"Alt text\" title=\"Edit Inline Keyboard Flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Feditinlinekeyboard.json\">\u003Cstrong>editinlinekeyboard flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 24:\u003C\u002Fstrong> Edit an inline keyboard example flow\u003C\u002Fp>\n\u003Cp>The message id needs to be saved in the flow or global context (via node \u003Cem>save messageId\u003C\u002Fem>). This is just a demo assuming that there is only one single chat.\u003C\u002Fp>\n\u003Cp>As next the initial keyboard has to be replaced with a modified one using the api command \u003Cem>editMessageReplyMarkup\u003C\u002Fem> command as type (via node \u003Cem>edit inline keyboard message\u003C\u002Fem>).\u003Cbr \u002F>\nAs an alternative to '\u003Cem>editMessageReplyMarkup\u003C\u002Fem> you can also use the api command \u003Cem>editMessageText\u003C\u002Fem> to replace the keyboard and also the text as given in the function example \u003Cem>edit message text\u003C\u002Fem>.\u003C\u002Fp>\n\u003Cp>The switch node \u003Cem>evaluate callback query\u003C\u002Fem> just handles the response and hides the keyboard using another api command \u003Cem>deleteMessage\u003C\u002Fem>.\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>initial inline keyboard message\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">context.global.keyboard = { pending : true, messageId : msg.payload.messageId };\n\nvar opts = {\n  reply_parameters: { message_id: msg.payload.messageId },\n  reply_markup: JSON.stringify({\n    \"inline_keyboard\": [[\n                {\n                    \"text\": \"Yes\",\n                    \"callback_data\": \"FOO YES\"\n                },\n                {\n                    \"text\": \"No\",\n                    \"callback_data\": \"FOO NO\"\n                }]\n            ]\n  })\n};\n\nmsg.payload.content = 'Do you want to hide the inline keyboard?';\nmsg.payload.options = opts;\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>save messageId\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">\u002F\u002F We store the messageId to be able to edit this reply in the callback query.\ncontext.global.keyboard.messageId = msg.payload.sentMessageId;\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>edit inline keyboard message\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">\u002F\u002F This is the message id of the initial keyboard that is simply exchanged by a new one.\nvar messageId = context.global.keyboard.messageId;\n\n\u002F\u002F This is a sample of how to send a second inline keyboard with modified buttons\nvar reply_markup = JSON.stringify({\n    \"inline_keyboard\": [[\n                {\n                    \"text\": \"Are you really sure?\",\n                    \"callback_data\": \"FOO YES REALLY\"\n                },\n                {\n                    \"text\": \"No\",\n                    \"callback_data\": \"FOO NO\"\n                }]\n            ]\n  });\n\n\nvar options = {\n    chat_id : msg.payload.chatId,\n    reply_markup : reply_markup,\n    message_id : messageId\n};\n\nmsg.payload.type = 'editMessageReplyMarkup';\nmsg.payload.content = reply_markup;\nmsg.payload.options = options;\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>evaluate callback query\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">\u002F\u002F This is a sample switch to demonstrate the handling of the user input.\nif(msg.payload.content === \"FOO YES REALLY\")\n{\n    \u002F\u002F Hide the keyboard and forget the messageId\n    msg.payload.type = 'deleteMessage';\n    msg.payload.content = context.global.keyboard.messageId\n    context.global.keyboard.messageId = null;\n\n    \u002F\u002F You could also send a editMessageReplyMarkup with an empty reply_markup here\n    return [ null, msg ];\n}\nelse\n{\n    var show_alert = false; \u002F\u002F you can set this to true to open a dialog with the answer in the client.\n\n    \u002F\u002F msg.payload.content contains the callback data from the keyboard.\n    \u002F\u002F You may change this value here.\n    msg.payload.options = show_alert;\n\n    return [ msg, null ];\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem> an alternative to node edit inline keyboard message\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">\u002F\u002F This is the message id of the initial keyboard that is simply exchanged by a new one.\nvar messageId = context.global.keyboard.messageId;\n\n\u002F\u002F This is a sample of how to send a second inline keyboard with modified buttons\nvar reply_markup = JSON.stringify({\n    \"inline_keyboard\": [[\n                {\n                    \"text\": \"Are you really sure?\",\n                    \"callback_data\": \"FOO YES REALLY\"\n                },\n                {\n                    \"text\": \"No\",\n                    \"callback_data\": \"FOO NO\"\n                }]\n            ]\n  });\n\n\nvar options = {\n    chat_id : msg.payload.chatId,\n    reply_markup : reply_markup,\n    message_id : messageId\n};\n\nmsg.payload.type = 'editMessageText';\nmsg.payload.content = \"Confirmation question\";\nmsg.payload.options = options;\n\nreturn [ msg ];\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Cbr \u002F>\n\u003Cp>The following figure shows the behaviour on a mobile device (e.g. cell phone). The example given above replaces the button description within the node \u003Cem>edit inline keyboard message\u003C\u002Fem>:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotEditInlineKeyboard7.png?raw=true\" alt=\"Alt text\" title=\"Edit Inline Keyboard screenshot\" \u002F>\u003Cbr \u002F>\n\u003Cstrong>Fig. 25:\u003C\u002Fstrong> Edit an inline keyboard example screenshot\u003C\u002Fp>\n\u003Ch2 id=\"implementing-an-inline_query\">\u003Ca class=\"header-anchor\" href=\"#implementing-an-inline_query\">Implementing an inline_query\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Bots can be called from any chat via inline_query when the bot is set to inline mode in botfather via \u002Fsetinline (see https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inline-mode).\u003Cbr \u002F>\nA sample flow is provided in the examples folder and could look like this:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotInlineQuery1.png?raw=true\" alt=\"Alt text\" title=\"Answer Inline Query Flow\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Finlinequery.json\">\u003Cstrong>inlinequery flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 26:\u003C\u002Fstrong> inline_query example flow\u003C\u002Fp>\n\u003Cp>The inline_query must be answered by sending a results array.\nSee https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inlinequeryresult.\u003Cbr \u002F>\nThe example just returns two simple articles, but almost every kind of content can be returned.\u003C\u002Fp>\n\u003Cp>Note that the inline_query can also contain the location of the sender. To enable this call \u002Fsetinlinegeo in botfather.\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>create results\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">\u002F\u002F we have to set the results propery with the answer(s)\n\u002F\u002F see https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inlinequeryresult\nvar results = [\n    \u002F\u002F result 1 is InlineQueryResultArticle\n    {\n        type : \"article\",\n        id : \"1\",\n        title : \"Result 1\",\n\n        \u002F\u002F InputTextMessageContent see https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inputmessagecontent\n        input_message_content : {\n            message_text : \"The message 1\",\n            parse_mode : \"Markdown\",\n            link_preview_options: { is_disabled: true }\n        }\n    },\n\n    \u002F\u002F result 2 is InlineQueryResultArticle\n    {\n        type : \"article\",\n        id : \"2\",\n        title : \"Result 2\",\n\n        \u002F\u002F InputTextMessageContent see https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi#inputmessagecontent\n        input_message_content : {\n            message_text : \"The message 2\",\n            parse_mode : \"Markdown\",\n            link_preview_options: { is_disabled: false }\n        }\n    }\n];\n\nmsg.payload.results = results;\n\nreturn msg;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Ch2 id=\"receiving-a-location\">\u003Ca class=\"header-anchor\" href=\"#receiving-a-location\">Receiving a location\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Locations can be send to the chat. The bot can receive the longitude and latitude:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fmaster\u002Fimages\u002FTelegramBotLocation.png?raw=true\" alt=\"Alt text\" title=\"Receive location\" \u002F>\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwindkh\u002Fnode-red-contrib-telegrambot\u002Fblob\u002Fmaster\u002Fexamples\u002Freceivinglocation.json\">\u003Cstrong>receivinglocation flow\u003C\u002Fstrong>\u003C\u002Fa>\u003Cbr \u002F>\n\u003Cstrong>Fig. 27:\u003C\u002Fstrong> Receiving a location example\u003C\u002Fp>\n\u003Cdetails>\n  \u003Csummary>Click to expand code snippet for \u003Cem>create location message\u003C\u002Fem> function\u003C\u002Fsummary>\n\u003Cpre>\u003Ccode class=\"language-javascript\">if(msg.payload.location) {\n    var lat = msg.payload.location.latitude;\n    var lng = msg.payload.location.longitude;\n    var user = msg.payload.from.username;\n\n    msg.payload.type = 'message';\n    msg.payload.content = user + ' moved to lat=' + lat + ' lon=' + lng;\n\n    return msg;\n}\nelse {\n    return null;\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdetails>\n\u003Ch2 id=\"sending-messages-to-a-specified-chat\">\u003Ca class=\"header-anchor\" href=\"#sending-messages-to-a-specified-chat\">Sending messages to a specified chat\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>If you have the chatId, you can send any message without the need of having received something before.\u003C\u002Fp>\n\u003Cp>![Alt text](images\u002FTelegramBotSendToCh\u003C\u002Fp>\n",1784738655407]