Skip to content

Instantly share code, notes, and snippets.

@v1dhun
Last active August 31, 2020 08:37
Show Gist options
  • Save v1dhun/afc70dd11f93d0c6393fa3c5573ee669 to your computer and use it in GitHub Desktop.
Save v1dhun/afc70dd11f93d0c6393fa3c5573ee669 to your computer and use it in GitHub Desktop.

Revisions

  1. v1dhun created this gist Aug 31, 2020.
    11 changes: 11 additions & 0 deletions send.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/bin/bash


    chat_id="$1"
    token="$2"

    SendFile(){
    curl -s -F chat_id="$chat_id" -F document=@"$1" -F caption="$2" https://api.telegram.org/bot$token/sendDocument &>/dev/null
    }

    SendFile "$3" "$4"