Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = async function App(context) {
console.log(context.event.message.nlp.entities);
const { datetime } = context.event.message.nlp.entities;
if (!datetime) {
return NoDatetime;
}
return withProps(ReplyDatetime, { datetime: datetime[0] });
};
module.exports = async function App(context) {
return router([
text('/list', withProps(ShowTodos, { todos: context.state.todos })),
text('/clear', ClearTodos),
text('*', AddTodo),
]);
};
const data = cache.get(context.state.word);
if (context.state.word == '' || data === undefined) {
return HintEnterNewWord;
}
const Router = router([
text('1', HandleNumber1),
text('2', HandleNumber2),
text('3', HandleNumber3),
text('4', HandleNumber4),
text('5', HandleNumber5),
text('*', HandleOtherNumber),
]);
return withProps(Router, { data });
}