Closed windowshater closed 8 months ago
That's because event challenge
has only challengeMessage
as a parameter, so _vote
is undefined in your case.
This is the correct code
vote.on('challenge', async (challengeMessage) => {
const challengeAnswers = await askUserForChallengeAnswers(challengeMessage.challenges)
vote.publishChallengeAnswers(challengeAnswers)
})
@estebanabaroa should we remove instances of publications in challenge events? They're not needed because the original publication instance is already up-to-date
Following the documentation:
Uppon using the _vote.publishChallengeAnswers() function I'm getting the error:
Looks like the _vote instance does not have that function, I avoid that by using the normal vote() function, here is my code: