-
Notifications
You must be signed in to change notification settings - Fork 48
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
Send message as a bot directly to the user (define user access_hash)? #12
Comments
You usually can obtain
|
Ok. Got it.
|
@esindger If I do not want to use
However full update event is:
Is it possible to get access to "full" update event inside |
Nice to see fast support in this project! Thanks. Actually, maybe I do not need "full" event object with users. What I need is "simple" reply() function.
This function is used in a lot of examples:
The same I want to achieve with Airgram (however Airgram will be more powefull, so I can use it for bot and fo user). E.g. somewhere in
But anyway, if I will get access to users array in |
Since v0.1.9 you have access to the parent update by
|
For now, there is no plan to implement |
Awesome! Thanks!
Got it. If you will make it - it would be nice. |
In typescript I get compile error:
Am I missing something? |
Please check out |
Now you can extend updates context. Please check out the example |
Yep. With version
Awesome! Thanks! |
I initialized bot:
Then I run bot and listen to messages from users.
If user send direct message to the bot I see following in update:
where
from_id
- id of user that sent messageto_id.user_id
- id of current botAnd I want to send some response message back to the user, however I can not do this:
because I do not know (as a bot) user
access_hash
. However user started conversation with bot first, so (as a bot) I must be able to getaccess_hash
from this user.I found answer to load dialogs, but as a bot I can not use this endpoint and I get:
How can I get user
access_hash
as a bot?The text was updated successfully, but these errors were encountered: