Text

Estructura

  • msg: Mensaje que se quiera mostrar por pantalla. Debe ser del tipo string

  • type: Tipo de elemento. Debe ser del tipo string

El texto en el campo msg admite formato tipo markdown y reemplazo de variables:

  • \n: Salto de línea

  • ** texto **: Texto en negrita

Si la variable @name está declarada y tiene un valor se reemplazará en el mensaje mostrado.

Los elementos del tipo text no permiten declarar variables. Para mas información sobre variables haz click aquí.

{
    "msg": "Bienvenido al bot de **imbee** @name",
    "type": "text"
}

Ejemplo de uso

{
    "steps": [
        {
            "name": "welcome",
            "tags": ["init"],
            "actions": [
                {
                    "msg": "Bienvenido al bot de **Imbee** @name",
                    "type": "text"
                },
                {
                    "msg": "Aquí puedes mostrar otro mensaje\n Incluso con salto de línea",
                    "type": "text"
                },
                {
                    "msg": "Puedes poner tantos mensajes como quieras...",
                    "type": "text"
                }
            ],
            "next_step": "step_2"
        }
    ]
}

Last updated