lib/Bot.js
function Bot(options) {
  this.base_url = 'https://api.telegram.org/';
  this.id = '';
  this.first_name = '';
  this.username = '';
  this.token = options.token;
  this.offset = options.offset ? options.offset : 0;
  this.interval = options.interval ? options.interval : 500;
  this.webhook = options.webhook ? options.webhook : false;
  this.parseCommand = options.parseCommand ? options.parseCommand : true;
  this.maxAttempts = options.maxAttempts ? options.maxAttempts : 5;
  this.polling = false;
  this.pollingRequest = null;
  this.analytics = null;
  this.timeout = options.timeout ? options.timeout : 60; //specify in seconds
  // define the messageType's
  this.NORMAL_MESSAGE = 1;
  this.EDITED_MESSAGE = 2;
}
function Bot(options) {
  this.base_url = 'https://api.telegram.org/';
  this.id = '';
  this.first_name = '';
  this.username = '';
  this.token = options.token;
  this.offset = options.offset ? options.offset : 0;
  this.interval = options.interval ? options.interval : 500;
  this.webhook = options.webhook ? options.webhook : false;
  this.parseCommand = options.parseCommand ? options.parseCommand : true;
  this.maxAttempts = options.maxAttempts ? options.maxAttempts : 5;
  this.polling = false;
  this.pollingRequest = null;
  this.analytics = null;
  this.timeout = options.timeout ? options.timeout : 60; //specify in seconds
  // define the messageType's
  this.NORMAL_MESSAGE = 1;
  this.EDITED_MESSAGE = 2;
}
function Bot ( options ) { this . base_url = 'https://api.telegram.org/' ; this . id = '' ; this . first_name = '' ; this . username = '' ; this . token = options . token ; this . offset = options . offset ? options . offset : 0 ; this . interval = options . interval ? options . interval : 500 ; this . webhook = options . webhook ? options . webhook : false ; this . parseCommand = options . parseCommand ? options . parseCommand : true ; this . maxAttempts = options . maxAttempts ? options . maxAttempts : 5 ; this . polling = false ; this . pollingRequest = null ; this . analytics = null ; this . timeout = options . timeout ? options . timeout : 60 ; //specify in seconds // define the messageType's this . NORMAL_MESSAGE = 1 ; this . EDITED_MESSAGE = 2 ; }
Constructor for Telegram Bot API Client.

@class Bot
@constructor
@param {Object} options        Configurations for the client
@param {String} options.token  Bot token

@see https://core.telegram.org/bots/api
Constructor for Telegram Bot API Client .