Creating a Telegram Bot

This tutorial explains how to create a bot on Telegram using BotFather, the official bot management tool.


📝 What Is BotFather?

BotFather is Telegram’s official bot used to create, configure, and manage other bots. With it, you can:

  • Create new bots

  • Generate access tokens

  • Change a bot’s name, description, and profile photo

  • Set custom commands


🚀 Step-by-Step: Create Your Bot

1. Open BotFather

  • Go to t.me/BotFather or search for @BotFather in Telegram.

  • Tap Start or send /start.

2. Create a New Bot

  • Send the command: /newbot

  • BotFather will ask for:

  • Bot name: The full display name (spaces allowed).

  • Username: Must end with bot (e.g., my_telegram_bot).

3. Get the API Token

After creation, BotFather sends a message containing your access token:

⚠️ Keep this token safe! It allows full control of your bot via the API.


🔧 Useful BotFather Commands

Command
Description

/newbot

Create a new bot

/mybots

List all bots you’ve created

/token

Generate a new token for a bot

/setname

Change the bot’s name

/setdescription

Set the description shown on the bot’s profile

/setabouttext

Set the “about” text for the bot

/setuserpic

Set the bot’s profile picture

/setcommands

Configure available commands (e.g., /start, /help)


🧪 Test Your Bot

  • In Telegram, search for your bot’s username (e.g., @my_telegram_bot).

  • Tap Start.

  • Your bot is now live, though it has no functionality yet.


🔄 Next Steps

To add features (reply to messages, handle commands, etc.), you’ll need to program the bot using an API. See the tutorial Creating a Bot with Python (replace with the actual link).


📎 Tip

You can add custom commands with /setcommands. Use this format: start - Start the bot help - Show help options info - Bot information


📚 Official Resources

Last updated