Skip to content

Instantly share code, notes, and snippets.

View sandeep's full-sized avatar

Sandeep Chivukula sandeep

View GitHub Profile
BotMetrics.shortenLink('https://www.google.com', 'bot-user-id', function(err, shortenedLink) {
// shortenedLink will look similar to https://bot.af/to/deadbeef
// which you can then use to send as part of your message payload
});
For Slack users, you will also have to send the team_id as a parameter:
BotMetrics.shortenLink('https://www.google.com', 'bot-user-id', {team_id: 'TDEADBEEF1'}, function(err, shortenedLink) {
// shortenedLink will look something like https://bot.af/to/deadbeef
// which you can then use to send as part of your message payload
//In your Kik Messenger Bot
BotMetrics.enrichUser('bot-user-id', {timezone: 'US/Pacific'},
function(err, status) {
});
{ score: 0.6841262,
intent: 'Greeting',
intents:
[ { intent: 'Greeting', score: 0.6841262 },
{ intent: 'None', score: 0.146624058 },
entities: [] }
var intents = new builder.IntentDialog({ recognizers: [recognizer] })
.matches('Greeting', (session, args) => {
session.send('oh Halo.');
})
.matches('None', (session, args) => {
session.send("Hrm.. I didn't understand that. Can you say it differently")
})
.onDefault((session) => {
session.send('Sorry, I did not understand \'%s\'.', session.message.text);
});
Hi
Hello
Good Morning
Good Evening
What’s Up?
Yo
How are you?
How’re you?
How are you doing?
How is everything?
@sandeep
sandeep / gist:b6fc2fd469d4b212655049e90f60d632
Created October 4, 2016 20:35
git clone git@github.com:botmetrics/botmetrics.git
git clone git@github.com:botmetrics/botmetrics.git

Keybase proof

I hereby claim:

  • I am sandeep on github.
  • I am sandeep (https://keybase.io/sandeep) on keybase.
  • I have a public key whose fingerprint is 00A1 9485 9941 F76B A264 CA06 B86E DBBF 25D4 98FA

To claim this, I am signing this object: