Closed chiefy closed 8 years ago
Hey @chiefy,
I tried your example and it works for me except the request part because you overwrite it on line 5:
const lodash = require('lodash');
const request = require('request-promise'); // <----
const botBuilder = require('claudia-bot-builder');
const base_url = 'https://www.omdbapi.com';
module.exports = botBuilder(request => { // <----
And here are the steps I did to run the example (after fixing request name collision):
claudia create --region us-east-1 --api-module movie
to create the Lambda function for bot builder. --api-module
is movie
because the name of your file is movie.js.claudia update --configure-slack-slash-command
and when it prompts you for the token, copy the token from the previous page and paste it there, then copy webhook url from the terminal to the Slack page. Press enter and wait for claudia to finish.Here's the screenshot:
Setup the command:
How it works:
@stojanovic derp, ok I will try again without overwriting request
Also check if your slackToken
variable is set as a stage variable on API Gateway.
You are saw that issue with missing token because of that variable.
When you follow the steps I described you should see slackToken
and lambdaVersion
stage variables for the latest API Gateway version.
@stojanovic thanks for the tip, I finally got it working! Not sure why I kept seeing that issue before re: request.post.token
missing.
I can't seem to get even the simplest example up and running, so I am not sure if this is a bug or I am just not sending the correct headers / data.
Here's an example project that I am trying to use
Even with the sample
bot.js
example I am getting: