Microsoft 团队中仅通知的 botNotification-only bots in Microsoft Teams

重要

本节中的文章基于 v3 Bot 框架 SDK。The articles in this section are based on the v3 Bot Framework SDK. 如果您要查找当前文档(SDK 版本4.6 或更高版本),请参阅 "对话 bot " 部分。If you're looking for current documentation (version 4.6 or later of the SDK) see the Conversational Bots section.

如果你的 bot 的唯一用途是将通知传递给用户,而不是会话,则可以isNotificationOnly在应用程序清单中启用该字段。If your bot's sole purpose is to deliver notification to users and is not conversational, you can enable the isNotificationOnly field in your app manifest. 这将产生以下更改:This produces the following changes:

  • 用户无法发送仅限通知的 bot。Users cannot message your notification-only bot.
  • 用户不能 @mention 机器人。Users cannot @mention the bot.

应用程序清单App manifest

若要启用此设置isNotificationOnlytrue请将设置为。To enable this, set isNotificationOnly to true.

备注

请注意,的值isNotificationOnly是布尔值,而不是字符串。Be aware that the value of isNotificationOnly is boolean and not a string.

{
  ⋮
  "bots":[
    {
      "botId":"[Microsoft App ID for your bot]",
      "isNotificationOnly": true,
      "scopes": [
        "personal",
        "team"
      ],
    }
  ],
  ...
}

最佳实践和限制Best practices and limitations