Browse documentation

Creating your bot with BotFather

Create a Telegram bot with BotFather, get your bot token, set a name and description, and configure commands — everything before hosting on FPS.ms.

CanerAkar Updated
On this page

Before you can host your Telegram bot on FPS.ms, you need to create it through Telegram's BotFather and get your bot token. BotFather is Telegram's official tool for creating and managing bots — it runs as a bot itself inside Telegram.

What is BotFather?

BotFather is Telegram's official bot for creating and managing other bots. Think of it as the admin panel for your bot — you use it to create bots, generate tokens, set names, descriptions, and profile pictures. Every Telegram bot starts with BotFather.

Step 1: Open BotFather

  1. Open Telegram on your phone, desktop, or web browser
  2. Search for @BotFather in the search bar
  3. Click on the verified BotFather account (it has a blue checkmark)
  4. Click Start or type /start

Verify it's the real BotFather

Make sure you're talking to the official BotFather with the blue verification checkmark. There are fake accounts that try to steal bot tokens.

Step 2: Create your bot

  1. Type /newbot or click the command in the menu
  2. BotFather asks for a display name — this is what users see (e.g., My Cool Bot). You can change this later.
  3. BotFather asks for a username — this must end in bot (e.g., my_cool_bot or MyCoolBot). This cannot be changed later, so choose carefully.

Choosing a username

The username must be unique across all of Telegram and must end in bot. Short, descriptive usernames like weather_alert_bot are better than generic ones like mybot123bot.

Step 3: Get your bot token

After creating the bot, BotFather sends you a message containing your bot token. It looks something like this:

7123456789:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw

Copy this token immediately — you'll need it to connect your code to Telegram.

Keep your token secret

Anyone with your bot token can control your bot. Never share it in screenshots, public repos, or messages. If your token is compromised, revoke it immediately with /revoke in BotFather.

Step 4: Set bot description and about text

While still in BotFather, configure your bot's profile:

  1. Type /setdescription — this text appears when users first open a chat with your bot (before pressing Start)
  2. Select your bot from the list
  3. Enter a description explaining what your bot does

Then set the about text:

  1. Type /setabouttext — this appears on your bot's profile page
  2. Select your bot
  3. Enter a short summary (up to 120 characters)

Step 5: Set bot commands

Setting commands through BotFather makes them appear in the Telegram menu when users type /:

  1. Type /setcommands
  2. Select your bot
  3. Send your commands in this format (one per line):
start - Start the bot
help - Show available commands
settings - Change bot settings

These are just labels

Setting commands in BotFather only creates the menu labels — you still need to handle them in your code. See our adding commands guide for the code side.

Step 6: Add the token to FPS.ms

Now that you have your token, add it to your FPS.ms server using a .env file:

  1. Go to panel.fps.ms and select your Telegram bot server
  2. In the Files tab, create a file named .env in the root directory
  3. Add your token: BOT_TOKEN=your-token-here
  4. Save the file and restart your server

For more details on managing your token securely, see our environment variables guide.

Useful BotFather commands

Here are all the BotFather commands you might need:

Command What it does
/newbot Create a new bot
/setname Change your bot's display name
/setdescription Set the description users see before starting
/setabouttext Set the short bio on your bot's profile
/setuserpic Upload a profile picture for your bot
/setcommands Set the command menu
/deletecommands Remove the command menu
/setprivacy Toggle group privacy mode (whether bot reads all messages or only commands)
/token Show your bot's current token
/revoke Revoke the token and generate a new one
/setinline Enable inline mode
/deletebot Permanently delete your bot

How to reset your token

If your token is compromised or you need a new one:

  1. Open BotFather in Telegram
  2. Type /revoke
  3. Select your bot
  4. BotFather generates a new token — copy it
  5. Update the token in your .env file on FPS.ms
  6. Restart your server

Old token stops immediately

After revoking, the old token stops working instantly. Your bot will go offline until you update the .env file and restart.

Next steps