From 766b45b8b79a6f9038b0113ee3fade86fdf24bfc Mon Sep 17 00:00:00 2001 From: Matt Cobb Date: Thu, 19 Dec 2019 13:02:54 -0800 Subject: [PATCH] Fixes #1879 Type on onChange() example --- packages/botkit/src/conversation.ts | 2 +- packages/docs/index.json | 4 ++-- packages/docs/reference/core.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index 951c211a2..5592b6cad 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -483,7 +483,7 @@ export class BotkitConversation extends Dialog { * * ```javascript * convo.ask('What is your name?', [], 'name'); - * convo.onChange('name', async(response, convo, bot) { + * convo.onChange('name', async(response, convo, bot) => { * * // user changed their name! * // do something... diff --git a/packages/docs/index.json b/packages/docs/index.json index 06a43121a..e5fbbf085 100644 --- a/packages/docs/index.json +++ b/packages/docs/index.json @@ -7076,7 +7076,7 @@ "flags": {}, "comment": { "shortText": "Bind a function to run whenever a user answers a specific question. Can be used to validate input and take conditional actions.", - "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```" + "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```" }, "parameters": [ { @@ -8222,7 +8222,7 @@ "flags": {}, "comment": { "shortText": "Bind a function to run whenever a user answers a specific question. Can be used to validate input and take conditional actions.", - "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```" + "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```" }, "parameters": [ { diff --git a/packages/docs/reference/core.md b/packages/docs/reference/core.md index 40434f1b1..e51347b3f 100644 --- a/packages/docs/reference/core.md +++ b/packages/docs/reference/core.md @@ -1170,7 +1170,7 @@ Bind a function to run whenever a user answers a specific question. Can be used ```javascript convo.ask('What is your name?', [], 'name'); -convo.onChange('name', async(response, convo, bot) { +convo.onChange('name', async(response, convo, bot) => { // user changed their name! // do something...