This file contains 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 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 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 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 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 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 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 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 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"]; |
This file contains 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
// Open the file in Xcode and modify this line with the next one | |
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; | |
// Your Mac needs to be in the same network as your device | |
jsCodeLocation = [NSURL URLWithString:@"http://ip-address-mac:8081/index.ios.bundle"]; |