Telegram Bot 中的 `msg.chat.id` 和 `msg.from.id` 有什么区别?

What is Difference between `msg.chat.id` and `msg.from.id` in Telegeram Bot?

Telegram 机器人中 msg.chat.idmsg.from.id 有什么区别? 显然,两者是相同的 Return 用户 ID。

bot.sendMessage(msg.chat.id, 'Hi', opts)

bot.sendMessage(msg.from.id, 'Hi', opts)

a chatId 是聊天的唯一标识符,可以是 privategroupsupergroupchanneluserId 仅是用户或机器人的唯一标识符。

唯一一次值可以相同是在私人聊天中。

阅读有关电报类型的更多信息here