This is the code I'm using
module.exports = function(controller) {
controller.hears("add",["direct_mention","mention"], (bot,message) => {
/*bot.startConversation(message,function(err,convo) {
if (err) throw err;
convo.ask("Enter quote: ", function(response,convo){
newQuote = response.text;
convo.next();
})
convo.ask("Enter answer: ", function(response,convo){
newAnswer = response.text;
convo.next();
})
convo.activate();
})*/
if (!quotes.includes(newQuote)){
fs.appendFile("quotes.txt",`\n${newQuote}`,function(err){
if (err) throw err;
});
fs.appendFile("answers.txt",`\n${newAnswer}`,function(err){
if (err) throw err;
});
}
});
};
But whenever it gets called, I get ../src/base_object-inl.h:138:static void node::BaseObject::InternalFieldSet(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&) [with int Field = 2; bool (v8::Value::* typecheck)() const = &v8::Value::IsFunction]: Assertion `((*value)->*typecheck)()' failed.
I've tried pasting in example conversations and it still happens. I can't see any obvious errors so I'm not sure what's going wrong