const bot = require('bbot'); const request = require('request'); bot.global.text(/(https?:\/\/.*)[, $]?/i, (b) => { request(b.match[1], (err, res, body) => { if (!err) { var re = /([^<]*)<\/title>/gi; var match = re.exec(body); bot.logger.info(match[1]); if (match && match[1]) { b.respond(":link: _" + match[1] + "_"); } } }); }, { id: 'get-url-metadata' });