/TelegramSendMessage

Command Line SendMessage and File to channel

Primary LanguageShellMIT LicenseMIT

TelegramSendMessage

這是一個在 Linux 終端機介面透過 curl 傳送到 telegram API,轉發到頻道的 script

使用方式

設定變數

  TOKEN=<TOKEN>
  CHAT_ID=<CHAT_ID>

執行方法

單純傳送文字

./SendMsg Hello

傳送文字與檔案

依照tdc給的教學 https://core.telegram.org/bots/api#document 將訊息變成傳送檔案的 caption

./SendMsg Hello /tmp/a.txt