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
| { | |
| "name": "Airline", | |
| "created": "2017-04-24T12:12:47.665Z", | |
| "intents": [ | |
| { | |
| "intent": "book-flight", | |
| "created": "2017-04-24T12:16:15.214Z", | |
| "updated": "2017-04-24T12:16:15.214Z", | |
| "examples": [ | |
| { |
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
| Afghanistan: af | |
| Albania: al | |
| Algeria: dz | |
| Andorra: ad | |
| Angola: ao | |
| Antigua and Barbuda: ag | |
| Argentina: ar | |
| Armenia: am | |
| Aruba: aw | |
| Australia: au |
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
| from slackeventsapi import SlackEventAdapter | |
| from slackclient import SlackClient | |
| from flask import request | |
| import os | |
| from watson_developer_cloud import ConversationV1 | |
| # We'll store the SlackClient instances for each team in a | |
| # dictionary, so we can have multiple teams authed | |
| CLIENTS = {} |
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
| from slackeventsapi import SlackEventAdapter | |
| from slackclient import SlackClient | |
| from flask import request | |
| import os | |
| from watson_developer_cloud import ConversationV1 | |
| # We'll store the SlackClient instances for each team in a | |
| # dictionary, so we can have multiple teams authed | |
| CLIENTS = {} |
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
| license: gpl-3.0 |
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
| // See documentation here: https://botmasterai.github.io/home | |
| const Botmaster = require('botmaster'); | |
| const SlackBot = Botmaster.botTypes.SlackBot; | |
| const SLACK_SETTINGS = { | |
| credentials: { | |
| clientId: process.env.SLACK_CLIENT_ID, | |
| clientSecret: process.env.SLACK_CLIENT_SECRET, | |
| verificationToken: process.env.SLACK_VERIFICATION_TOKEN | |
| }, |
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
| const Botmaster = require('botmaster'); | |
| const SlackBot = Botmaster.botTypes.SlackBot; | |
| const botmaster = new Botmaster(); | |
| const slackBot = new SlackBot(SLACK_SETTINGS); | |
| botmaster.addBot(slackBot); | |
| botmaster.on('update', (bot, update) => { | |
| bot.reply(update, 'Hello world'); |
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
| const Botmaster = require('botmaster'); | |
| const MessengerBot = Botmaster.botTypes.MessengerBot; | |
| const botmaster = new Botmaster(); | |
| const slackBot = new SlackBot({ | |
| credentials: { | |
| clientId: process.env.SLACK_CLIENT_ID, | |
| clientSecret: process.env.SLACK_CLIENT_SECRENT, | |
| verificationToken: process.env.SLACK_VERIFICATION_TOKEN |
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
| if(msg.payload.intents.length > 0) { | |
| if(msg.payload.intents[0].intent === "departure_time") { | |
| msg.payload = {"text": "The departure time of your flight is at 7:35pm"} | |
| } else { | |
| msg.payload = {"text": "The arrival time of your flight is at 9:35pm"} | |
| } | |
| } else { | |
| msg.payload = {"text": "Sorry I did not understand"} | |
| } |
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
| jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; |