Skip to content

Commit 028ea11

Browse files
authored
Merge pull request howdyai#1880 from mattcobb/issue-1879
Fixes howdyai#1879 Typo in onChange() example
2 parents e15ce37 + 766b45b commit 028ea11

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/botkit/src/conversation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export class BotkitConversation<O extends object = {}> extends Dialog<O> {
483483
*
484484
* ```javascript
485485
* convo.ask('What is your name?', [], 'name');
486-
* convo.onChange('name', async(response, convo, bot) {
486+
* convo.onChange('name', async(response, convo, bot) => {
487487
*
488488
* // user changed their name!
489489
* // do something...

packages/docs/index.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7076,7 +7076,7 @@
70767076
"flags": {},
70777077
"comment": {
70787078
"shortText": "Bind a function to run whenever a user answers a specific question. Can be used to validate input and take conditional actions.",
7079-
"text": "```javascript\nconvo.ask('What is your name?', [], 'name');\nconvo.onChange('name', async(response, convo, bot) {\n\n // user changed their name!\n // do something...\n\n});\n```"
7079+
"text": "```javascript\nconvo.ask('What is your name?', [], 'name');\nconvo.onChange('name', async(response, convo, bot) => {\n\n // user changed their name!\n // do something...\n\n});\n```"
70807080
},
70817081
"parameters": [
70827082
{
@@ -8222,7 +8222,7 @@
82228222
"flags": {},
82238223
"comment": {
82248224
"shortText": "Bind a function to run whenever a user answers a specific question. Can be used to validate input and take conditional actions.",
8225-
"text": "```javascript\nconvo.ask('What is your name?', [], 'name');\nconvo.onChange('name', async(response, convo, bot) {\n\n // user changed their name!\n // do something...\n\n});\n```"
8225+
"text": "```javascript\nconvo.ask('What is your name?', [], 'name');\nconvo.onChange('name', async(response, convo, bot) => {\n\n // user changed their name!\n // do something...\n\n});\n```"
82268226
},
82278227
"parameters": [
82288228
{

packages/docs/reference/core.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ Bind a function to run whenever a user answers a specific question. Can be used
11701170

11711171
```javascript
11721172
convo.ask('What is your name?', [], 'name');
1173-
convo.onChange('name', async(response, convo, bot) {
1173+
convo.onChange('name', async(response, convo, bot) => {
11741174
11751175
// user changed their name!
11761176
// do something...

0 commit comments

Comments
 (0)