Commit 2f781881 authored by Tammo Ronke's avatar Tammo Ronke

text2

parent 87dfc97f
......@@ -3,21 +3,6 @@ const GSearch = require("../utils/gsearch");
module.exports = [
(session, args, next) => {
args = [
{
url:
"https://medium.com/financial-times/ethereums-vitalik-buterin-on-the-bitcoin-bubble-and-running-a-125bn-blockchain-4ce5f25e7046",
title:
"Ethereum’s Vitalik Buterin on the Bitcoin Bubble and Running a $125bn Blockchain",
topic: "Ethereum"
},
{
url:
"https://media.consensys.net/programmable-blockchains-in-context-ethereum-s-future-cd8451eb421e",
title: "Programmable blockchains in context: Ethereum’s Future",
topic: "Future"
}
];
const msg = suggCards(session, args);
const choices = [];
......
......@@ -3,11 +3,31 @@ var suggestionStore = require("../store/suggestion");
module.exports = [
(session, args, next) => {
session.userData.vote = args;
next();
},
(session, next) => {
builder.Prompts.text(session, "hi");
const choices = ["Not for me", "It was ok", "Loved it"];
const reply = new builder.Message(session).addAttachment(
new builder.HeroCard(session)
.text(
`How did you like the article: **${args.title}** about **${
args.topic
}**?`
)
.buttons([
builder.CardAction.postBack(
session,
"Not for me",
"Not for me"
),
builder.CardAction.postBack(
session,
"It was ok",
"It was ok"
),
builder.CardAction.postBack(session, "Loved it", "Loved it")
])
);
builder.Prompts.choice(session, reply, choices);
},
(session, args, next) => {
switch (args.response.index) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment