We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 572d477 commit 3dc1b7eCopy full SHA for 3dc1b7e
labs/04-hello-world-bot/bot.js
@@ -24,8 +24,15 @@ class MyBot {
24
// interpret usermessage with compromise for further use
25
var userMessage = nlp(rawtext);
26
27
- if(userMessage.has("welcome")) {
28
- await turnContext.sendActivity(`Hello you!`);
+ // check if user sends a welcome-meesage
+ if(userMessage.has("(hi|hello|welcome)")) {
29
+ // Send the use a warm welcome message
30
+ await turnContext.sendActivity(`Welcome fellow human!`);
31
+ }
32
+ // check if use says good bye
33
+ else if (userMessage.has("(bye|adios|exit|cancel)")){
34
+ // Send the use a goob-bye message
35
+ await turnContext.sendActivity(`Sorry to see you go human...`);
36
}
37
await turnContext.sendActivity(`You said "${rawtext}"`);
38
} else {
0 commit comments