Skip to content

Instantly share code, notes, and snippets.

@arsenikt
Last active September 26, 2020 17:37
Show Gist options
  • Select an option

  • Save arsenikt/0485026b62e811922721a476c63f2229 to your computer and use it in GitHub Desktop.

Select an option

Save arsenikt/0485026b62e811922721a476c63f2229 to your computer and use it in GitHub Desktop.
Telgram bot NodeJS
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