What are Telegram bots and how do they work?
A Telegram bot is not a person and not an AI in itself — it is a program that talks to Telegram on your behalf through the Bot API. It can send and receive messages, files, and buttons, and it runs wherever you host its code. Here is how the pieces fit together.
The Bot API and the token
Every bot is created in BotFather, which issues a token — a secret string that identifies the bot. Your code uses that token to call Telegram's Bot API over HTTPS: send a message, fetch a file, edit a post. Whoever holds the token controls the bot, so it is kept secret and can be revoked if it leaks.
How a bot receives messages
There are two ways for a bot to hear what is happening. Long polling: the bot repeatedly asks Telegram "anything new?" Webhooks: Telegram pushes each update to a URL you control the moment it happens. Webhooks are faster and lighter, and are what most production bots use.
What bots can do
Bots can post and reply, send photos, documents, and video, offer inline buttons and menus, edit or delete their own messages, and react to commands like /start. What they cannot do is act like a full user account: they cannot add themselves to groups, and they only see what their permissions allow.
Privacy mode: the common surprise
By default a bot in a group only sees messages that mention it or reply to it — this is privacy mode. If you want a bot to read every message in a group, for example to relay it somewhere else, you must disable privacy mode in BotFather with /setprivacy. Miss this step and the bot looks broken when it is simply not being told anything.
Bots you run yourself
Because a bot is just code plus a token, you can run your own instead of trusting a shared one. Crosswire takes this bring-your-own-bot approach: you create a bot in BotFather, paste the token, and Crosswire uses it to bridge a Slack channel to your Telegram group. The bot is yours, the token is yours, and you can revoke it any time.