-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
windka
committed
Aug 28, 2022
1 parent
0e2f101
commit 99985c4
Showing
4 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"id":"f7c18f49.063c4","type":"telegram sender","z":"c8b50aaa.e632d","name":"","bot":"2db9661a.cf3b0a","x":730,"y":900,"wires":[[]]},{"id":"f97878f7.de1bf8","type":"function","z":"c8b50aaa.e632d","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 = 12345;\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":900,"wires":[["f7c18f49.063c4","67925ff5.4c7c9"]]},{"id":"67925ff5.4c7c9","type":"debug","z":"c8b50aaa.e632d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":960,"wires":[]},{"id":"e1a6a394.269598","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":900,"wires":[["f97878f7.de1bf8"]]},{"id":"981d4537.1ced18","type":"telegram event","z":"c8b50aaa.e632d","name":"","bot":"2db9661a.cf3b0a","event":"callback_query","autoanswer":false,"x":240,"y":982,"wires":[["ab3f06a.9c5a0f8"]]},{"id":"ab3f06a.9c5a0f8","type":"debug","z":"c8b50aaa.e632d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":430,"y":982,"wires":[]},{"id":"93430912.0f4f4","type":"comment","z":"c8b50aaa.e632d","name":"Inline keyboard: Reply with \"callback_query\"","info":"","x":350,"y":842,"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}] | ||
[{"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 // text : text, <-- 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}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters