yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.45k stars 1.53k forks source link

Please add getFullUser method #797

Closed iamludal closed 4 years ago

iamludal commented 4 years ago

Feature Request.


Feature Request

I have:

Introduction

A getFullUser method directly on the instance of TelegramBot. This can allow to fetch the profile of a user from its id (to get, for instance, its username, first name...)

See : https://core.telegram.org/method/users.getFullUser

Example

const bot = new TelegramBot(TOKEN)
const userId = 123456789

bot.getFullUser(userId) // Return: TelegramBot.User
    .then(user => {
        console.log(user.first_name)
    })
danielperez9430 commented 4 years ago

@luddoz-c Hi, this method is no from Telegram Bot API (https://core.telegram.org/bots/api).

The method you are talking about is for Telegram customers, not bots. If you want to do that you must create a userbot and use TDLib

fabiomig commented 3 years ago

Actually, bots can call it

https://core.telegram.org/method/users.getFullUser

danielperez9430 commented 3 years ago

Actually, bots can call it

https://core.telegram.org/method/users.getFullUser

But it is not the Telegram bot API, it is a method that you can use if you use TDLib for your bot.