dockerized_openAger/nodered/rootfs/data/node_modules/node-red-contrib-telegrambot/examples/onreplymessage.json

1 line
1.5 KiB
JSON
Raw Normal View History

2020-10-17 16:42:50 +00:00
[{"id":"ff78bc5a.00874","type":"telegram bot","z":"70c3f45a.8f3c0c","botname":"HeinzBot","usernames":"","chatids":""},{"id":"a1dabe3a.5e254","type":"function","z":"70c3f45a.8f3c0c","name":"create question","func":"msg.payload.type = 'message';\nmsg.payload.content = 'Really?';\nmsg.payload.options = {reply_to_message_id : msg.payload.messageId}\nreturn [ msg ];\n","outputs":"1","noerr":0,"x":284,"y":115,"wires":[["fa470b3b.05b8f8"]]},{"id":"7da02f32.825fd","type":"telegram command","z":"70c3f45a.8f3c0c","name":"/foo","command":"/foo","bot":"ff78bc5a.00874","x":112,"y":121,"wires":[["a1dabe3a.5e254"],[]]},{"id":"fa470b3b.05b8f8","type":"telegram sender","z":"70c3f45a.8f3c0c","name":"send question","bot":"ff78bc5a.00874","x":474,"y":115,"wires":[["14f02133.eb0fdf"]]},{"id":"14f02133.eb0fdf","type":"telegram reply","z":"70c3f45a.8f3c0c","name":"get reply","bot":"ff78bc5a.00874","x":669,"y":115,"wires":[["c51200a.f3aee"]]},{"id":"c51200a.f3aee","type":"function","z":"70c3f45a.8f3c0c","name":"switch answer","func":"if(msg.payload.content === 'Yes')\n{\n return [msg, null]; \n}\nelse\n{\n return [null, msg]; \n}\n","outputs":"2","noerr":0,"x":841,"y":115,"wires":[["99233690.66dcc8"],["8deb3205.7214d"]]},{"id":"99233690.66dcc8","type":"debug","z":"70c3f45a.8f3c0c","name":"Yes","active":true,"console":"false","complete":"payload","x":1043,"y":99,"wires":[]},{"id":"8deb3205.7214d","type":"debug","z":"70c3f45a.8f3c0c","name":"No","active":true,"console":"false","complete":"payload","x":1043,"y":146,"wires":[]}]