-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get user's information? #173
Comments
I also have the same doubt. |
I do not know if this is the best way, but I was able to return the first name of the user, using |
Simply use |
Hello guys, I'm pretty new in Telegram, do you have an example? I'm incorrectly making this:
startHandler($){
sorry for english im from spain |
Scope is $. |
@ghost This is how I get the userId, first_name, last_name from the scope ($) const firstName = $.message.chat.firstName ? $.message.chat.firstName : $.message.chat.lastName;
const msg = $.message.text ? $.message.text : 'Not a text';
const userId = $.message.chat.id;
console.log(`First name: ${firstName}. Message: ${msg}. UserId: ${userId}`); |
How can I get userId, first_name, last_name, etc from $ scope in controller?
or is there any way to pass the User object to the controller ?
The text was updated successfully, but these errors were encountered: