Telegeram Bot中`msg.chat.id`和`msg.from.id`的区别是什么?

Sed*_*rei 3 telegram-bot node-telegram-bot-api

Telegeram Bot msg.chat.id和之间的区别是什么msg.from.id显然,两者都是相同的并且返回用户ID.

bot.sendMessage(msg.chat.id, 'Hi', opts)
Run Code Online (Sandbox Code Playgroud)

bot.sendMessage(msg.from.id, 'Hi', opts)
Run Code Online (Sandbox Code Playgroud)

Moh*_*ail 7

一个chatId为聊天的唯一标识符,其可以是private,group,supergroupchannel用户id为仅一个用户或机器人的唯一标识符.

值可以相同的唯一时间是私人聊天.

了解更多关于报文类型在这里.