Created
February 24, 2017 05:13
-
-
Save jabb3rd/e143f3d33514f032ec178ec9e48f8788 to your computer and use it in GitHub Desktop.
Set global variables and functions for Telegram BotAPI
This file contains hidden or 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
:global tgAPI "https://api.telegram.org/bot123456789:ABCDEF0123456789abcdef0123456789ABC" | |
:global tgID "123456" | |
# Telegram BotAPI sendMessage method | |
# Example: $tgSendMessage $chatid $text | |
:global tgSendMessage do={ | |
:global tgAPI | |
:local url ($tgAPI . "/sendMessage\?chat_id=" . $1 . "&text=" . $2) | |
/tool fetch keep-result=no url="$url" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment