是否对Cisco Spark(现为Webex团队)Bot提供了丰富的卡支持

时间:2018-07-18 10:06:02

标签: bots cisco botkit webex

我正在实现一个cisco spark bot,现在称为Webex团队。我能够发送接收来自用户的简单文本消息。有没有办法从Bot向用户发送丰富卡?我找不到任何有用的文档。

这是我与机器人进行交互的代码

var SparkBot = require("node-sparkbot");

var SparkAPIWrapper = require("node-sparkclient");
// Starts your Webhook with default configuration where the SPARK API access 
token is read from the SPARK_TOKEN env variable 
var bot = new SparkBot();

var spark = new SparkAPIWrapper(process.env.SPARK_TOKEN);

bot.onMessage(function (trigger, message) {
     if (message.personEmail != "mytestbot@webex.bot")

       spark.createMessage(message.roomId, "You said " + message.text, { 
       "markdown": 
        true }, function (err, message) {
        if (err) {
        console.log("WARNING: could not post message to room: " + 
        message.roomId);
        return;
       }
    });
});

丰富的卡片可能包含按钮,链接,列表,缩略图等。

1 个答案:

答案 0 :(得分:1)

平台端尚不支持此功能。您目前拥有的最好的功能就是可以使用markdown设置消息的样式。