text: const TelegramBot = require('node-telegram-bot-api');
  
  const bot = new TelegramBot("532265326:AAFMoYHsnPF73byAcYUMMldQ9EQjFYAdK-A", {
    polling: true
  });
  
  const request = require('request');
  
  const firebase = require('firebase');
  firebase.initializeApp({
    apiKey: "AIzaSyDiZaEva3BbAf1x9IZntPU_SCDZgmoBxiY",
    authDomain: "raebot-eb5e4.firebaseapp.com",
    databaseURL: "https://raebot-eb5e4.firebaseio.com",
    projectId: "raebot-eb5e4",
    storageBucket: "raebot-eb5e4.appspot.com",
    messagingSenderId: "364950280663"
  });
  
  const database = firebase.database();
  const ref = database.ref('gentes');
  
  ref.on('value', data => {
     Names = [];
     let Gentes = data.val();
     let keys = Object.keys(songs);
     for (let i = 0; i < keys.length; i++) {
       let k = keys[i];
       Names.push(Gentes[k].name);
       console.log(k);
     }
  });
  
  bot.onText(/(\/start|\/help)/, (msg) => {
    bot.sendMessage(msg.chat.id, "Este bot manda la palabra del día cuando escribes /palabra");
    getdata();
  });
  
  bot.onText(/\/palabra/, (msg) => {
    request('http://dle.rae.es/srv/wotd', function (error, response, body) {
      let word = body.substring(body.lastIndexOf('">')+2,body.length-5);
      let link = "dle.rae.es/?" + body.substring(body.lastIndexOf('href="')+6,body.lastIndexOf('">'));
      bot.sendMessage(msg.chat.id, "La palabra del día es:\n" + word + "\n\n" + link);
    });
  });
  
  bot.onText(/\/mandar/, (msg) => {
    ref.push(data = {
      id: msg.chat.id
    });
  });
  
  bot.onText(/\/nomandar/, (msg) => {
  
  });
  