Yeah, not at all. I would rather write a telegram bot, which only accepts commands from my account for inclusion.
https://api.telegram.org/botXXXXXXXXXXXXXXXXXX/getUpdates
https://api.telegram.org/bot265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4/sendmessage?chat_id=631290&text=test
/tool fetch url="https://api.telegram.org/bot265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4/sendmessage\?chat_id=631290&text=test " keep-result=no
system script add name="helloworld" policy=read source={/tool fetch url="https://api.telegram.org/bot265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4/sendmessage\?chat_id=631290&text=Hello,world! " keep-result=no}
system script add name="itsworking" policy=read source={/tool fetch url="https://api.telegram.org/bot265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4/sendmessage\?chat_id=631290&text=Test OK, it's Working " keep-result=no}
system script add name="wolmypc" policy=read source="/tool wol mac=XX:XX:XX:XX:XX:XX interface=ifname\r\ \n/tool fetch url=\"https://api.telegram.org/boXXXXXXXXXXXXXXXXXXX\\?chat_id=631290&text=wol OK\" keep-resul\ t=no"
/system scheduler add interval=30s name=Telegram on-event=":tool fetch url=(\"https://api.telegr\ am.org/\".\$botID.\"/getUpdates\") ;\r\ \n:global content [/file get [/file find name=getUpdates] contents] ;\r\ \n:global startLoc 0;\r\ \n:global endLoc 0;\r\ \n\r\ \n:if ( [/file get [/file find name=getUpdates] size] > 50 ) do={\r\ \n\r\ \n:set startLoc [:find \$content \"update_id\" \$lastEnd ] ;\r\ \n:set startLoc ( \$startLoc + 11 ) ;\r\ \n:local endLoc [:find \$content \",\" \$startLoc] ;\r\ \n:local messageId ([:pick \$content \$startLoc \$endLoc] + (1));\r\ \n:put [\$messageId] ;\r\ \n:#log info message=\"updateID \$messageId\" ;\r\ \n\r\ \n:set startLoc [:find \$content \"text\" \$lastEnd ] ;\r\ \n:set startLoc ( \$startLoc + 7 ) ;\r\ \n:local endLoc [:find \$content \",\" (\$startLoc)] ;\r\ \n:set endLoc ( \$endLoc - 1 ) ;\r\ \n:local message [:pick \$content (\$startLoc + 2) \$endLoc] ;\r\ \n:put [\$message] ;\r\ \n:#log info message=\"message \$message \";\r\ \n\r\ \n:set startLoc [:find \$content \"chat\" \$lastEnd ] ;\r\ \n:set startLoc ( \$startLoc + 12 ) ;\r\ \n:local endLoc [:find \$content \",\" \$startLoc] ;\r\ \n:local chatId ([:pick \$content \$startLoc \$endLoc]);\r\ \n:put [\$chatId] ;\r\ \n:#log info message=\"chatID \$chatId \";\r\ \n\r\ \n:if ((\$chatId = \$myChatID) and (:put [/system script find name=\$messa\ ge] != \"\")) do={\r\ \n:system script run \$message} else={:tool fetch url=(\"https://api.teleg\ ram.org/\".\$botID.\"/sendmessage\\\?chat_id=\".\$chatId.\"&text=I can't t\ alk with you. \") keep-result=no} ;\r\ \n:tool fetch url=(\"https://api.telegram.org/\".\$botID.\"/getUpdates\\\?\ offset=\$messageId\") keep-result=no; \r\ \n} \r\ \n" policy=\ ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \ start-date=nov/02/2010 start-time=00:00:00 add name=Telegram-startup on-event=":delay 5\r\ \n:global botID \"botXXXXXXXXXXXXXXXXXX\" ;\r\ \n:global myChatID \"631290\" ;\r\ \n:global startLoc 0;\r\ \n:global endLoc 0;\r\ \n:tool fetch url=(\"https://api.telegram.org/\".\$botID.\"/getUpdates\") \ ;" policy=\ ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \ start-time=startup
:delay 5 :global botID "botXXXXXXXXXXXXXXXXXX" ; token bot :global myChatID "xxxxxx" ; chat_id :global startLoc 0; :global endLoc 0; :tool fetch url=("https://api.telegram.org/".$botID."/getUpdates") ;
:tool fetch url=("https://api.telegram.org/".$botID."/getUpdates") ; :global content [/file get [/file find name=getUpdates] contents] ; :global startLoc 0; :global endLoc 0; :if ( [/file get [/file find name=getUpdates] size] > 50 ) do={ :set startLoc [:find $content "update_id" $lastEnd ] ; :set startLoc ( $startLoc + 11 ) ; :local endLoc [:find $content "," $startLoc] ; :local messageId ([:pick $content $startLoc $endLoc] + (1)); :put [$messageId] ; #:log info message="updateID $messageId" ; :set startLoc [:find $content "text" $lastEnd ] ; :set startLoc ( $startLoc + 7 ) ; :local endLoc [:find $content "," ($startLoc)] ; :set endLoc ( $endLoc - 1 ) ; :local message [:pick $content ($startLoc + 2) $endLoc] ; :put [$message] ; #:log info message="message $message "; :set startLoc [:find $content "chat" $lastEnd ] ; :set startLoc ( $startLoc + 12 ) ; :local endLoc [:find $content "," $startLoc] ; :local chatId ([:pick $content $startLoc $endLoc]); :put [$chatId] ; #:log info message="chatID $chatId "; :if (($chatId = $myChatID) and (:put [/system script find name=$message] != "")) do={ :system script run $message} else={:tool fetch url=("https://api.telegram.org/".$botID."/sendmessage\?chat_id=".$chatId."&text=I can't talk with you. ") keep-result=no} ; :tool fetch url=("https://api.telegram.org/".$botID."/getUpdates\?offset=$messageId") keep-result=no; }
/getUpdates?offset=update_id + 1
:local message [:pick $content ($startLoc + 2) $endLoc] ; : :local message [:pick $content ($startLoc + 1) $endLoc] ;
Source: https://habr.com/ru/post/314108/