botId 是 bot 范围内的吗?它是永久性的吗?

Is botId that bot scoped? Is it permanent?

我在 webhook 中收到的 botId 是仅 bot 范围还是在找到的所有 bot 中都是唯一的?

它是永久性的还是可以更改?

botId 我的意思是您填写的 recipient.idreplyToId 中的 ID 将消息请求发送到端点 https://smba.trafficmanager.net/apis/v3/conversations/{{skype.idRecipient}}/activities:

{
    "text": "God help us!",
    "type": "message",

    "from": {
        "id": "{{skype.idBot}}",
        "name": "bot"
    },
   "recipient": {
        "id": "{{skype.idRecipient}}",
        "name": "user"
    },

    "replyToId": "{{skype.idBot}}"
}

您所说的ID仅在当前频道(Skype/Facebook/Slack...)中是唯一的,因为它是ChannelAccount的ID。 以下是文档中的一些陈述:

Every bot and user has an account within each channel. The account contains an identifier (id) and other informative bot non-structural data, like an optional name.

还有

Channel accounts have meaning only within their associated channel

所以不排除id在其他频道重复的可能。 至于永久性,这取决于您使用的渠道,再次在文档中说明:

The stability of associations between IDs, accounts, mailboxes, and people depends on the channel

但如果您希望它是 "unique across all the bots found",那么您可以通过组合 AppIDChannelID 和用户 ID 来创建一个 ID。

这里还有一个非常有用的 guide 关于 Bot Framework 中 ID 的信息,可能对您有所帮助