Closed ndarville closed 8 years ago
var dict = nlp.verb(message.match[1]).conjugate();
bot.reply(message, {
"attachments": [{
"fallback" : "Conjugation of _\"to " + message.match[1] + "\"_",
"pretext" : "`" + message.match[1] + "`",
"mrkdwn_in": ["fallback", "pretext"],
"color" : config.color,
"fields" : Object.keys(dict).map(function(key) {
return {
"title": capitalizeFirstLetter(key).replace("_", " "),
"value": dict[key],
"short": false
};
})
}]
});
var dict = nlp.verb(message.match[1]).conjugate(),
output = "";
// Slack trims the trailing newline
Object.keys(dict).map(function(key) {
return output += "*" + capitalizeFirstLetter(key).replace("_", " ") + ":*" + \
dict[key] + "\n";
]);
bot.reply(message, output);
How come you can’t add photos when the issue is closed?
Looks better like this: