(JS) 如何获取已回复的 Telegram 用户 ID?

(JS) How can I get a Telegram user's ID that has been replied?

我有一个“/status”命令,当你回复他的消息时,它应该会显示用户的数据。例如:

User1: random text
User2: /status [reply to user 1]
Bot: User 1's data: ...

如何使用 Telegram Bot API (JS)?

const getUserId = (message) => {
  if (message.reply_to_message) {
    return message.reply_to_message.from.id;
  }
  return message.from.id;
};