Il modulo nodejs usato è botgram:
Per installarlo sul server Linux:
npm install -g botgram
Questo è il sorgente:
[Source not found]
Palette utilizzato:
ClipBoard per l'importazione:
[{"id":"ef45d564.5e4668","type":"telegram command","z":"1b884cc0.45a903","name":"/start","command":"/start","bot":"40fc04bc.f4d53c","x":237,"y":116,"wires":[["9c13583a.7d8208"],[]]},{"id":"9c13583a.7d8208","type":"function","z":"1b884cc0.45a903","name":"create /start text","func":"var startMessage = \"Ciao \"+msg.originalMessage.from.username+\", benvenuto!\\r\\n\";\nstartMessage += \"sono il photo bot manda le foto da archiviare...\\r\\n\";\n\nmsg.payload.content = startMessage;\nreturn msg;","outputs":1,"noerr":0,"x":447,"y":107,"wires":[["1b49ef38.c6e1f1"]]},{"id":"1b49ef38.c6e1f1","type":"telegram sender","z":"1b884cc0.45a903","name":"send response","bot":"40fc04bc.f4d53c","x":725,"y":103,"wires":[[]]},{"id":"bd5cff9.759b2","type":"telegram receiver","z":"1b884cc0.45a903","name":"","bot":"40fc04bc.f4d53c","saveDataDir":"/home/pi/temp","x":216,"y":246,"wires":[["c050bbd1.a50028","59d7d794.13f308"],[]]},{"id":"c050bbd1.a50028","type":"function","z":"1b884cc0.45a903","name":"respond to photo message","func":"if(msg.payload.type == 'photo')\n{ \n msg.payload.type = 'sticker';\n msg.payload.content = 'CAADAQAD1gMAAmEkzgAB-Fd_OiHCc-kC';\n return msg;\n}\nelse\n{\n return null;\n}\n","outputs":1,"noerr":0,"x":483,"y":245,"wires":[["1b49ef38.c6e1f1"]]},{"id":"59d7d794.13f308","type":"json","z":"1b884cc0.45a903","name":"","pretty":true,"x":481,"y":344,"wires":[["fec0b0b9.0bdd"]]},{"id":"fec0b0b9.0bdd","type":"file","z":"1b884cc0.45a903","name":"","filename":"/home/pi/temp/logjson","appendNewline":true,"createDir":false,"overwriteFile":"false","x":753,"y":342,"wires":[]},{"id":"40fc04bc.f4d53c","type":"telegram bot","z":"","botname":"telegramBot","usernames":"","chatids":""}]
2018 Ⓒ TanzoLab