【问题标题】:Loading Microsoft Bot into MS Teams works, but I can't interact with the bot将 Microsoft Bot 加载到 MS Teams 中有效,但我无法与 bot 交互
【发布时间】:2018-04-03 03:32:47
【问题描述】:

我一直在使用 .NET SDK 为 Microsoft Teams 开发机器人。以前,我可以毫不费力地将机器人侧载到团队中并与之交互。我可以@mention团队中的机器人,并且可以与它进行一对一聊天。

最近,我更新了 bot 和 manifest.json,因此我将其从团队中删除并重新添加。该机器人已成功添加到团队中,但是,我不能再 @mention 它,并且在我拥有的预先存在的一对一中。让我向机器人输入消息的文本字段消失了。

有趣的是,如果我从团队中删除机器人并且不重新添加它,我可以回到与它的一对一对话,并且发送消息的文本字段又回来了。

有没有人经历过这种行为,或者知道我错过了什么?提前致谢!

下面是我的manifest.json,替换了识别文字:

{
    "$schema": "https://statics.teams.microsoft.com/sdk/v1.2/manifest/MicrosoftTeams.schema.json",
    "manifestVersion": "1.2",
    "version": "1.1.2",
    "id": "appId",
    "packageName": "com.example.app",
    "developer": {
        "name": "name",
        "websiteUrl": "https://example.com/",
        "privacyUrl": "https://example.com/privacy",
        "termsOfUseUrl": "https://example.com/terms"
    },
    "name": {
        "short": "shortName",
        "full": "this is the full name"
    },
    "description": {
        "short": "Short description.",
        "full": "Longer description."
    },
    "icons": {
        "outline": "20.png",
        "color": "96.png"
    },
    "accentColor": "#b00b2d",
    "bots": [{
        "botId": "appId",
        "needsChannelSelector": "true",
        "isNotificationOnly": "false",
        "scopes": ["team", "personal"],
        "commandLists": [{
            "scopes": ["team", "personal"],
            "commands": [{
                    "title": "command1",
                    "description": "Do this command"
                },
                {
                    "title": "command2",
                    "description": "Do this command"
                },
                {
                    "title": "command3",
                    "description": "Do this command"
                }
            ]
        }]
    }],
    "permissions": [
        "identity",
        "messageTeamMembers"
    ]
}

【问题讨论】:

    标签: json botframework microsoft-teams


    【解决方案1】:

    isNotificationOnly 实际上是一个布尔字段,而不是字符串字段。在您的清单中更改:

    "isNotificationOnly": false,

    我们最近发布了“仅通知机器人”功能,在这种情况下,我们关闭了文本框以向机器人输入命令。我们应该在旁加载时给你一个模式验证错误,但我们没有。我们会解决这个问题。

    非空字符串在 JavaScript 中是真实的,因此 "false" 的计算结果为 true

    【讨论】:

    • 哇,感谢您的快速回复,成功了!是的,错误消息将不胜感激:)
    猜你喜欢
    • 2017-11-05
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    • 2019-11-27
    • 1970-01-01
    • 2020-05-07
    • 2021-01-08
    • 2019-11-14
    相关资源
    最近更新 更多