Coder Social home page Coder Social logo

Comments (6)

quickjp2 avatar quickjp2 commented on August 12, 2024

Hubot will respond twice after the mem answer, then three times after the next, then four after the next, finally sending off 5 different json packets.

from vsphere-commands.

quickjp2 avatar quickjp2 commented on August 12, 2024

Refactored the code in a new branch, but now the issue is the callback function passed to the respond object for a question is being called once when declared and then again when actually responding.
hubotresponseerror

from vsphere-commands.

quickjp2 avatar quickjp2 commented on August 12, 2024

hubotresponseerrorp2

from vsphere-commands.

quickjp2 avatar quickjp2 commented on August 12, 2024

The two pictures show that the callback function is being called once before the user response and once after. I purposely prevented the next call from being executed until the dual call issue is fixed.

from vsphere-commands.

heckj avatar heckj commented on August 12, 2024

hey @quickjp2

I think you're misreading the error - the issue isn't that askQuestion is getting called multiple times (looks like it's designed very much to be called recursively), but that it can't find the reference to itself:

ReferenceError: askQuestion is not defined

from vsphere-commands.

quickjp2 avatar quickjp2 commented on August 12, 2024

Indeed! It is meant to be recursive. But the problem is not that it's not recursing (if that's even a word). The issue is that recursive function is being called before I even respond to it.

from vsphere-commands.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.