You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started.md
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,14 @@ Looking to get started with Botpress but unsure how? This page is for you! We'll
8
8
- A no-coding bot building platform
9
9
- A code-from-scratch bot building platform
10
10
- In competition with other bot building tools
11
-
- Extremely hard to use and reserved to PhD's
12
-
- A side project that will be abandonned in a few weeks
13
-
- A cure to cancer
11
+
- Extremely hard to use and reserved for PhD's
12
+
- A side project that will be abandoned in a few weeks
13
+
- A cure for cancer
14
14
15
15
## What Botpress is
16
16
17
17
- A code-first bot building platform
18
-
- Onpremise (i.e. runs locally, host it yourself)
18
+
- On-premise (i.e. runs locally, host it yourself)
19
19
- Modular & open-source (don't reinvent the wheel)
20
20
- Community-focused. We want everybody to contribute and create modules.
21
21
- Leveraging as many other tools as possible
@@ -25,23 +25,23 @@ Looking to get started with Botpress but unsure how? This page is for you! We'll
25
25
26
26
## What you get by using Botpress
27
27
28
-
Before creating Botpress, we created many bots using all the tools available on the market. When you build a bot, you basically have the choice between using a SaaS platform (like Chatfuel, FlowXO, Motion.ai) or coding a bot from scratch. Let's look at why both don't work:
28
+
Before creating Botpress, we created many bots using all the tools available on the market. What we found is that when you build a bot, you basically have the choice between using a SaaS platform (like Chatfuel, FlowXO, Motion.ai) or coding a bot from scratch. Let's look at why both don't work:
29
29
30
-
- The SaaS thing looks very interesting because it's very easy to get started and requires no coding skills. The problems come when you want to actually get your bot to do stuff that are not supported by the SaaS or that you want to customize the overall experience. Some let you call APIs to run custom code, which defies the first purpose of being hassle-free and no-coding-required.
30
+
- The SaaS thing looks interesting because it's very easy to get started and requires no coding skills. The problems come when you want to get your bot to do things that aren't supported by the SaaS or if you want to customize the overall experience. Some platforms let you call APIs to run custom code, but this defies the purpose of being hassle-free and not requiring coding.
31
31
32
-
- Coding a bot from scratch is often the first reflex for developers. Sure, it's a bit longer and we need to learn how things work. But that's what makes us programmers. We like to create things ourselves, and that's fine! But... how am I supposed to schedule broadcasts? Fetch and cache user profiles? Save and process customer orders? Add Human-in-the-loop capabilities? See where my bot messed up in production? Edit the content live without redeploying the bot? Do A/B testing? Hmmmm..
32
+
- Coding a bot from scratch is often the first reflex for developers. Sure, it takes a bit longer and we need to learn how things work. But that's what makes us programmers. We like to create things ourselves, and that's fine! But... how am I supposed to schedule broadcasts? Fetch and cache user profiles? Save and process customer orders? Add Human-in-the-loop capabilities? See where my bot messed up in production? Edit the content live without redeploying the bot? Do A/B testing? Hmmmm..
33
33
34
-
That's why we created Botpress. We combined all the advantages of the SaaS and the "from Scratch" into an easy-to-use modular framework. All these things that would take you weeks to implement from scratch are available as Botpress Modules. Everything is accessible from a rich graphical interface, so once your bot is coded literally anybody can manage it.
34
+
That's why we created Botpress. We combined all the advantages of the SaaS and the "from Scratch" into an easy-to-use modular framework. All these things that would take you weeks to implement from scratch are available as Botpress Modules. Everything is accessible from a rich graphical interface, so once your bot is coded, literally anybody can manage it.
35
35
36
-
THe philosophy behind botpress is that if there's something you want your bot to do and that thing is not specific to only your bot, then **there should be a module for it**. If there's not, we hope that you will take the time to make a positive contribution to the rest of us and **create the missing module**.
36
+
The philosophy behind botpress is that if there's something you want your bot to do and that thing is not specific to only your bot, then **there should be a module for it**. If there isn't, then we hope that you will take the time to make a positive contribution to the community and **create the missing module**.
37
37
38
38
## Your very first Messenger bot
39
39
40
40
In this section, we will see how easy it is to build a Messenger bot using Botpress.
41
41
42
42
### 1. Install the botpress CLI on your computer
43
43
44
-
You need to have `botpress` installed as a global dependency using `npm`. If it's done yet, run the following command:
44
+
You need to have `botpress` installed as a global dependency using `npm`. If you haven't done that yet, just run the following command:
45
45
46
46
```
47
47
npm install -g botpress
@@ -59,7 +59,7 @@ mkdir hello-world-bot && cd hello-world-bot
59
59
md hello-world-bot && cd hello-world-bot
60
60
```
61
61
62
-
Then you can use the botpress CLI to initialize a new bot inside this directory. This will automatically create a sample bot inside an empty directory, will all the files you need to run it with botpress.
62
+
Then you can use the botpress CLI to initialize a new bot inside this directory. This will automatically create a sample bot inside an empty directory, with all the files you need to run it with botpress.
63
63
64
64
```
65
65
botpress init
@@ -69,17 +69,17 @@ At this point, **botpress is installed locally** (as a npm dependency) and this
69
69
70
70
### 3. Installing Messenger
71
71
72
-
You now have a bot, but it does nothing. Your bot is not connected to any messaging platform and does not process incoming text at all. We'll fix that now.
72
+
You now have a bot, but it does nothing. Your bot is not connected to any messaging platform and does not process incoming text. We'll fix that now.
73
73
74
-
Since your bot is just a regular nodejs program, we can install npm modules to add features to our bot. If you [search NPM for botpress](https://www.npmjs.com/search?q=botpress), you'll see there's many modules.
74
+
Since your bot is just a regular nodejs program, we can install npm modules to add features to our bot. If you [search NPM for botpress](https://www.npmjs.com/search?q=botpress), you'll see there are many modules.
75
75
76
76
[**botpress-messenger**](https://github.com/botpress/botpress-messenger) seems to be the module we need to connect our bot to Facebook Messenger. Let's install it as a local dependency:
77
77
78
78
```
79
79
npm install --save botpress-messenger
80
80
```
81
81
82
-
> Tip: There's a shortcut: `botpress install messenger`. And there's also an alias: `botpress i messenger`. An even shorter one: `bp i messenger`.
82
+
> Tip: There's a shortcut: `botpress install messenger`. And there's also an alias: `botpress i messenger`. And an even shorter one: `bp i messenger`.
83
83
84
84
### 4. Running the bot
85
85
@@ -89,18 +89,18 @@ Now that we have a bot with Messenger installed, we can run this bot. Just like
89
89
botpress start
90
90
```
91
91
92
-
Head to [**http://localhost:3000**](http://localhost:3000) to see your bot's graphical interface. You should see the Messenger module we just installed showing up at the left!
92
+
Head to [**http://localhost:3000**](http://localhost:3000) to see your bot's graphical interface. You should see the Messenger module we just installed showing up on the left!
93
93
94
-
### 5. Configure Messenger connexion settings
94
+
### 5. Configure Messenger connection settings
95
95
96
-
Before we can actually start adding stuff, we need to link your bot to a Facebook Page. The Messenger module [has an entire step-by-step tutorial](https://github.com/botpress/botpress-messenger#get-started) on how to do this, but if you ever created a Messenger bot before you probably don't need to read it.
96
+
Before we can actually start adding stuff, we need to link your bot to a Facebook Page. The Messenger module [has an entire step-by-step tutorial](https://github.com/botpress/botpress-messenger#get-started) on how to do this, but if you have ever created a Messenger bot before you probably don't need to read it.
97
97
98
98
Summary:
99
99
100
100
1. Create a [Facebook Page](https://www.facebook.com/pages/create) if you don't already have one.
101
101
2. Create a [Messenger Application](https://developers.facebook.com/) if you don't already have one.
102
102
3. Grab your **App ID**, **App Secret** and **Token Access**, and copy them directly in the botpress-messenger UI.
103
-
4. Use [**ngrok**](https://ngrok.com/) to create a secure ssl tunnel to your computer (so that facebook can talk to your bot). We added a convenience ngrok button directly in botpress-messenger so that you don't have to update it manually. If you experience any problem, we suggest you use the ngrok CLI instead.
103
+
4. Use [**ngrok**](https://ngrok.com/) to create a secure ssl tunnel to your computer (so that facebook can talk to your bot). We added a convenient ngrok button directly in botpress-messenger so that you don't have to update it manually. If you experience any problem, we suggest you use the ngrok CLI instead.
Note: Here we listen on a hardcoded "hello" string, but the [`hear`](https://docs.botpress.io/core-reference.html) command is pretty powerful and can do much more.
145
+
Note: Here we are listening out for a hardcoded "hello" string, but the [`hear`](https://docs.botpress.io/core-reference.html) command is pretty powerful and can do much more.
146
146
147
147
Now stop your bot (by killing the current nodejs process that runs it, i.e. CTRL-C on Mac) and start it again. Now the bot should answer to 'hello'!
148
148
149
149
### 7. A bit fancier Hello World
150
150
151
151
Now let's explore a little more the power of the `botpress-messenger` module.
152
152
153
-
What if we wanted our bot to respond to the user by its name? The messenger module automatically fetched the user profiles and inject it in the `event.user` object. The user profiles are cached by the module to keep your bot running fast:
153
+
What if we wanted our bot to respond to the user by its name? The messenger module automatically fetches the user profile and injects it in the `event.user` object. The user profiles are cached by the module to keep your bot running fast:
154
154
155
155
```js
156
156
module.exports=function(bp) {
@@ -168,7 +168,7 @@ Note that the sendText function also takes a third argument, and we configured i
168
168
169
169
## Having more fun
170
170
171
-
This was just the very beginning of what you can do with Botpress. If you would like to get started with real fun stuff, make sure to:
171
+
This was just the very beginning of what you can do with Botpress. If you would like to get started with the real fun stuff, be sure to:
172
172
173
173
1. Read the rest of the documentation
174
174
2. Check out the [Cookbook](https://github.com/botpress/cookbook), which contains lots of code recipes for common bot tasks
0 commit comments