Last active
September 26, 2020 17:37
-
-
Save arsenikt/0485026b62e811922721a476c63f2229 to your computer and use it in GitHub Desktop.
Telgram bot NodeJS
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
| var TelegramBot = require('node-telegram-bot-api'); | |
| const tgToken = '1111-ABCDEF'; // Your token from Telegram Bot Father | |
| const userId = "111111111" // User or Channel ID | |
| function sendMessage(content) { | |
| var bot = new TelegramBot(tgToken, { polling: false }); | |
| bot.sendMessage(userId , content, { parse_mode: "HTML" }); | |
| } | |
| var txhash = "0x112233" | |
| var content = "New combo! TxHash: " + txhash | |
| sendMessage(content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment