DEV.XFOR.TOP

Email: dev@xfor.top Skype: utz0r2 Github: utz0r2
CSSHTMLPHPJSVideoNoty
E-commerce Scripts: vvStore | vvShop | Avox
© 2008 – 2020
Вернуться
» » » peekobot - a simple, choice-driven chatbot framework for your website written in less than 100 lines of vanilla JavaScript (and some CSS)

peekobot - a simple, choice-driven chatbot framework for your website written in less than 100 lines of vanilla JavaScript (and some CSS)

peekobot - a simple, choice-driven chatbot framework for your website written in less than 100 lines of vanilla JavaScript (and some CSS)

const chat = {
    1: {
        text: 'Good morning sir',
        next: 2
    },
    2: {
        text: 'Would you like tea or coffee with your breakfast?',
        options: [
            {
                text: 'Tea',
                next: 3
            },
            {
                text: 'Coffee',
                next: 4
            }
        ]
    },
    3: {
        text: 'Splendid - a fine drink if I do say so myself.'
    },
    4: {
        text: 'As you wish, sir'
    }
}

https://github.com/Peekobot/peekobot | example page
Оставить комментарий
Вверх