问题
Currently im working on a telegram bot with Dialogflow. I want to get information about the user like current coordinates and user name but im not able to get them in the JSON coming from telegram. Is there a way to do such a thing without using any related google assistant events?
回答1:
You can check the structure of updates received by bot on the documentation Telegram Bot API
update.message.from
contains the User object.
update.message.location
contains the Location object.
Be aware that the location will be present only if the user actually sent his position to the bot, it will not be a metadata coming along with every message.
来源:https://stackoverflow.com/questions/56152226/is-there-a-way-to-get-user-coordinates-from-telegram-bot-using-dialogflow