Skip to content

.on fired twice #67

@zigmund

Description

@zigmund

Hi there,

I started bot from example:

var Bot = require('node-telegram-bot');

var bot = new Bot({
  token: 'bla bla token'
})
.on('message', function (message) {
  console.log(message);
})
.start();

Every time I send msg to bot I got .on fired twice;

{ message_id: 12,
  from: 
   { id: 000,
     first_name: 'first',
     last_name: 'last',
     username: 'usr' },
  chat: 
   { id: 135648167,
     first_name: 'first',
     last_name: 'last',
     username: 'usr',
     type: 'private' },
  date: 1453575130,
  text: 'test' }
{ message_id: 12,
  from: 
   { id: 135648167,
     first_name: 'first',
     last_name: 'last',
     username: 'usr' },
  chat: 
   { id: 135648167,
     first_name: 'first',
     last_name: 'last',
     username: 'usr',
     type: 'private' },
  date: 1453575130,
  text: 'test' }

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