Bot sending an interactive google map to Telegram user - telegram-bot

A bot wants to send a map with specific lat/lng point to a Telegram user. When clicked that map should lead user to an interactive map version.
I saw one bot (SberbankBot) can do that, but I need to know how exactly.
I'm using Python 2.7 + telepot library.

As #mymedia pointed out in comments, you can use sendLocation method of Telegram Bot APi, and using telepot:
bot.sendLocation(chat_id, latitude=lat, longitude=lon);

Related

How to implement Telegram bot as a widget on your website?

I'm trying to create some sort of live chat widget, but with a Telegram bot instead of a real person on the other side. I don't know if it is possible, but ideally, there is a chat window that can be implemented on a website, and establishes a new connection with a telegram bot once you click on it. The end-user should NOT have a Telegram account. I already tried to implement Intergram but it's not exactly what I'm looking for, as it merely forwards the message to a human using webhooks, and the bot is only used as a message broker. I have heard that some customization is possible using tdlib but I'm not sure if it can help me achieve the desired result.
How should I start implementing a chat window with my bot on a website?

Google hangout chat data with out bot

Is there a way to read the data from the chat messages in DM or Group with out adding the bot the DM or Group?
Similar to the APIs that are available to programmatically access the google drive, is there a way ?
Answer:
No, there isn't.
More Information:
The only API access you can get for Hangouts chat rooms is by using a bot. You can also use a webhook, but this is only for sending messages and not receiving.
You will need to use a bot to be able to do this.

Telegram bot analytics

I have checked telegram bot api web but could not find analytics api for bot, is telegram provide
analytics api for bots, if yes any one have reference it will helps me a lot
the Telegram API does not provide you with a way to get analytics. It is only an interface to operate the bot automatically.
However, there are services like this:
https://www.integromat.com/en/integrations/google-analytics/telegram
You can check it out and see if it fits your needs.
Whenever you build a database you can create metrics and analytics.
To analyze statistics, Telegram Robot, you must save anyone who starts the robot in the database(json data base or mysql or etc). To do this, you can get the user id (it is easy to get the user id)

how to create a bot with in telegram with botfather and using only a code?

There are some steps that have been mentioned in telegram api for creating a bot using a botfather.
I was hoping if there is a way that these steps can turn into code.
to be specific, I want to get a token from botfather using code, and then later in the code, I use this token.
Yes this is very possible.
You would however need to build a Telegram Client, that will interact with BotFather.
The interaction should be easy to script, as BotFather interaction follows just a few simple steps

Telegram bots - how can we detect that a user has started typing?

We can get Telegram messages when they are complete and sent via long polling or webhooks, but is there a way to understand when the user has started typing?
I guess this is not a normal case for bots and I dont think there is a straight away method but could we fall back on the Telegram API for messaging apps for that?
Well, actually I found a solution in the current Bot API; inline queries. While they are not intended for this, inline queries send what the user types in to the bot in real-time, so you are alerted as soon as the first characters are typed in.
There is a way in Telegram Core API, named: updateUserTyping.
But there is not any way in Telegram Bot API yet (until today: 2016-10-17).
If you type or send a file to the bot during these processes you do not get any message from Telegram in your webhook, but it's possible they'll add a new feature to detect user typing in future Bot API updates.