yeuai/botscript

New conditional activation syntax

vunb opened this issue · 0 comments

vunb commented

Need an enhancement syntax to define a condition:

  • Syntax: * expresssion => action
  • Action may be empty
    • To define an conditional activation
    • The condition will be tested before the dialogue is activated or not
  • Action may be a reply
  • Action may be a command
  • Action may be a flow
  • Action may be an event
  • Action may be a redirect
  • Action may be a prompt

Example:

# a diaglogue filter
* expression
* expression => - a reply
* expression => @ a command
* expression => ~ a flow
* expression => + a redirect
* expression => * an event
* expression => ? a prompt

# for multiple, just define a list
! hello
- Hello
- Hallo

# then use the list in brackets
* expression => - [hello]
* expression => * [hello]