How to use the hubot.Response function in hubot

To help you get started, we’ve selected a few hubot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kengz / aiva / scripts / deepdream.js View on Github external
// dependencies
// Interface for Google Deepdream
const Response = require('hubot').Response
var _ = require('lomath')
var fs = require('fs')
var runDeepdream = require('../lib/deepdream')
var request = require('request')

// quick test scripts
/* istanbul ignore next */
module.exports = function(robot) {
  robot.on("fb_richMsg", function(envelope) {
    robot.logger.info("got fb richMsg", envelope.attachments[0])
    runDeepdream(envelope)
    .then(function(outFilepath) {
      robot.logger.info('DeepDream outFile', outFilepath)
      var formData = {
        recipient: `{"id":"${envelope.user.id}"}`,
        message: '{"attachment":{"type":"image", "payload":{}}}',