Skip to content

Commit 69ef6fb

Browse files
committed
Spell checks
1 parent 4536246 commit 69ef6fb

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

_posts/2016-06-17-claudia-bot-builder.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Let's rebuild that now. Step by step.
3333
We're going to follow the instructions from the [Getting Started guide](https://github.com/claudiajs/claudia-bot-builder/blob/master/GETTING_STARTED.md) of the Claudia-bot-builder repository. There's some short administration first;
3434

3535
* Install [nvm](https://github.com/creationix/nvm) or something similar so that you can `nvm install v4.3.2` that Claudia-bot-builder requires (and AWS now supports)
36-
* Intall ClaudiaJs globally (if you want to) for that version of Node `npm install claudia -g` or update it if it's already installed `npm update claudia -g`
36+
* Install ClaudiaJs globally (if you want to) for that version of Node `npm install claudia -g` or update it if it's already installed `npm update claudia -g`
3737
* Set up an [AWS Account](https://www.marcusoft.net/2016/02/first-aws-lamda-steps.html#setting-up-your-environment) - yeah that's troublesome, but a one time thing. Hang in there.
3838
* And then some coding.
3939

@@ -55,25 +55,25 @@ module.exports = botBuilder(request => {
5555

5656
return co(function*() {
5757
var start = new Date();
58-
var result = yield coreq(url);
59-
var end = new Date() - start;
58+
var result = yield coreq(url);
59+
var end = new Date() - start;
6060

6161
return `Pinged ${url} successfully - took ${end} ms`;
6262
}).catch(function(err) {
63-
return `Could not ping ${url} (${err.message})`;
63+
return `Could not ping ${url} (${err.message})`;
6464
});
6565
});
6666
```
6767

68-
The `claudia-bot-builder` gives us a simple construct that receives the `request` object as single inparameter. From that we can read the `request.text` property which contains the text that the user sends us. In our case we will use a [Slack Slash Command](https://api.slack.com/) like this: `/pingu https://www.marcusoft.net`, and in that case `request.text` will be `https://www.marcusoft.net`.
68+
The `claudia-bot-builder` gives us a simple construct that receives the `request` object as single in-parameter. From that we can read the `request.text` property which contains the text that the user sends us. In our case we will use a [Slack Slash Command](https://api.slack.com/) like this: `/pingu https://www.marcusoft.net`, and in that case `request.text` will be `https://www.marcusoft.net`.
6969

7070
I'm using the [co-request](https://www.npmjs.com/package/co-request) module as to do simple http request, co-request allows me to use `yield` rather than the callback horrors that I've come to hate.
7171

7272
There's some simple error handling in there as well. Good enough for now.
7373

7474
To get all the dependencies we need into our application, and more importantly into the `package.json`, we can use this command:
7575

76-
```
76+
```bash
7777
npm install claudia-bot-builder co co-request -S
7878
```
7979

@@ -83,7 +83,7 @@ That's the hard part done.
8383

8484
Now for the part where Claudia excels. Deploying this is super simple:
8585

86-
```
86+
```bash
8787
claudia create --region us-east-1 --api-module bot
8888
```
8989

@@ -133,10 +133,10 @@ Create a `testdata/basictest.json` file containing the following:
133133

134134
```json
135135
{
136-
"context" : {
137-
"path" : "/",
138-
"method" : "GET"
139-
}
136+
"context" : {
137+
"path" : "/",
138+
"method" : "GET"
139+
}
140140
}
141141
```
142142

@@ -155,7 +155,7 @@ From this part on it's just following the wizard. Here's a few pointers:
155155
156156
So that's `https://vozc2ng03h.execute-api.us-east-1.amazonaws.com/latest/slack/slash-command` in my case
157157
* I left method as POST
158-
* I customised the name to be `pingu`
158+
* I customized the name to be `pingu`
159159
* I uploaded a, most likely trademark violated, picture for my command
160160
* Finally I added a nice description and a usage hint
161161

@@ -184,7 +184,7 @@ Better yet... use [Claudia Bot Builder](https://www.npmjs.com/package/claudia-bo
184184

185185
`claudia update --configure-slack-slash-command` for slash-commands for only your team (that's what this article is about.). And use `claudia update --configure-slack-slash-app` for Slack applications.
186186

187-
## Test!
187+
## Test
188188

189189
Once all of that is done you can now go to the Slack group for which you installed the command and run your beauty.
190190

@@ -200,4 +200,4 @@ A testimony to see this quick turnaround in action would be to change the comman
200200

201201
It just works.
202202

203-
My code can be [found here](https://github.com/marcusoftnet/pingu).
203+
My code can be [found here](https://github.com/marcusoftnet/pingu).

0 commit comments

Comments
 (0)