Skip to content

Instantly share code, notes, and snippets.

@hongthaiphi
Last active May 20, 2016 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hongthaiphi/6c57265b73ef55644b9c1cb432752f59 to your computer and use it in GitHub Desktop.
Save hongthaiphi/6c57265b73ef55644b9c1cb432752f59 to your computer and use it in GitHub Desktop.
'use strict'
var tg = require('telegram-node-bot')('YOUR_TOKEN')
tg.router.
when(['ping'], 'PingController')
tg.controller('PingController', ($) => {
tg.for('ping', () => {
console.log($);
$.sendMessage('pong')
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment