Skip to content
This repository was archived by the owner on Jan 19, 2020. It is now read-only.

Getting Started : Creating Your First Bot sample does not work #87

@sarvex

Description

@sarvex
const Bottr = require('bottr');
const bot = new Bottr.Bot();

bot.on('message_received', function(message, session) {
  session.send('Hello World')
})

bot.listen();

The code when run gives error Cannot GET /

However if I include the BottrApp back it gives the expected result

const Bottr = require('bottr');
const BottrApp = require('bottr-app');

const bot = new Bottr.Bot();

bot.use(new BottrApp());
bot.on('message_received', (message, session) => {
  session.send('Hello, World');
});

bot.listen();

The guide should be updated with running code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions