Create a bot with @BotFather
What it is
@BotFather is Telegram's bot for creating and managing bots. It gives your bot a name, a username and a token, the key your program uses to control it. Making the bot actually do something takes code: Telegram's FAQ says there's no out-of-the-box way to build a working bot if you're not a developer.
How to do it
The commands work the same in every Telegram app.
- Open `t.me/BotFather` and tap Start.
- Send /newbot.
- Send a name; /setname changes it later.
- Send a username: 5–32 characters, Latin letters, digits and underscores, ending in "bot" (tetris_bot or TetrisBot).
- BotFather replies with the token. Store it like a password.
- Fill in /setdescription (up to 512 characters, shown under "What can this bot… Fill in /setdescription (up to 512 characters, shown under "What can this bot do?"), /setabouttext (up to 120, shown on the profile), /setuserpic and /setcommands.
- Change things later in /mybots › your bot › Edit Bot, or in BotFather's Mini App at `t.me/botfather?startapp`.
Watch out
- Anyone with the token controls the bot. If it leaks, send /token to generate a new one.
- The username can't be changed later, so choose carefully.
- You can transfer a bot (/mybots › your bot) only to someone who has interacted with it at least once, and the transfer is permanent.
- /deletebot frees the username and can't be undone.
With Gem
A Gem project needs no BotFather and no code, and your own bot can't be connected to Gem yet: everything runs through @gembot. Send /newproject with one sentence; Gem asks at most two questions, offers free names and builds your landing page `gem.bot/<name>` and Mini App page `t.me/gembot?startapp=<name>`.
Sources
- https://core.telegram.org/bots/features#botfather
- https://core.telegram.org/bots/tutorial
- https://telegram.org/faq#q-how-do-i-create-a-bot