[{"id":"e8ce557a.c772a8","type":"catch","z":"117ca2b6.9952d5","name":"","x":240,"y":2540,"wires":[["cd3e5352.717538"]]},{"id":"cd3e5352.717538","type":"debug","z":"117ca2b6.9952d5","name":"Debug","active":false,"console":"false","complete":"payload","x":700,"y":2540,"wires":[]},{"id":"cfe3317f.d2ce7","type":"telegram sender","z":"117ca2b6.9952d5","name":"show keyboard","bot":"d086776c.7de82","x":730,"y":2380,"wires":[[]]},{"id":"db28aeae.a44ba8","type":"function","z":"117ca2b6.9952d5","name":"confirmation message","func":"context.global.keyboard = { pending : true };\n\nvar opts = {\n reply_to_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","outputs":"1","noerr":0,"initialize":"","finalize":"","x":470,"y":2380,"wires":[["cfe3317f.d2ce7"]]},{"id":"cc400aac.97c5f8","type":"telegram command","z":"117ca2b6.9952d5","name":"/foo","command":"/foo","bot":"d086776c.7de82","strict":false,"hasresponse":true,"x":230,"y":2420,"wires":[["db28aeae.a44ba8"],["469a1a73.b143cc"]]},{"id":"469a1a73.b143cc","type":"function","z":"117ca2b6.9952d5","name":"create response","func":"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}","outputs":"2","noerr":0,"initialize":"","finalize":"","x":450,"y":2460,"wires":[["d044e1c5.953458"],["cd3e5352.717538"]]},{"id":"d044e1c5.953458","type":"telegram sender","z":"117ca2b6.9952d5","name":"send response","bot":"d086776c.7de82","x":720,"y":2440,"wires":[[]]},{"id":"d086776c.7de82","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}]