forked from eniagreen/botml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
survey.bot
116 lines (88 loc) · 1.29 KB
/
survey.bot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
! BOTML 3
~ start
< starting!
~ [survey]
> [ok]
~ [survey]
> no
< really no?
~ survey
< survey time!
~ [color]
~ [age]
< OK thanks!
~ [show]
# ~ [name]
# ~ [birthplace]
~ show
< So you are age ${age},
Favorite color is ${color}
Your name is ${name}
Born in ${birthplace}. [ending]
~ name
< What should I call you?
< What's your name?
> *{name}
< Great, I'll call you $name
< ok
~ color
< whats your fave color?
---
> blue
< Don't be sad!
---
> red
< Roses are red!
---
> *{color}
< you like ${color}
# ---
# < OK you like ${color}
~ age
< How old are you?
> #{age}
< OK got it, you're ${age}.
# ~ ask_age
# > *{age}
# ---
# ---
# ```!/[0-9].*/.test($age)```
# < Please give me a number
# ~ [ask_age]
# ---
~ birthplace
< And where were you born?
> * in *{birthplace}
> * near *{birthplace}
> *{birthplace}
< [ok]
> status
~ [status]
~ status
< age: ${age}
name: ${name}
born: ${birthplace}
@ trigger('status', $age, $name, $birthplace)
> dbg
@ trigger('dbg')
> reset
< resetting
@ trigger('reset')
# @ trigger('status', [ $age, $name, $birthplace ] )
# @ trigger('status', [ {age: $age, name: $name, birthplace: $birthplace} ] )
# lists
= ending
- Have a nice day
- That's all for now.
= hello
- hello
- hi
- hey
- good day
= ok
- ok
- k
- alright
- sure
- yes
- yeah