Bamboo Bot

Guides › Telegram

How to make a Telegram bot

About 4 minutes. Free.

Telegram has the simplest bot setup of any chat app: you ask another bot, @BotFather, for a new one and it hands you a token. The one setting that trips almost everyone up is privacy mode - if your bot answers commands but ignores everything else in a group, that's why.

1. Create the bot

  1. In Telegram, open a chat with @BotFather (check the blue verified tick).
  2. Send /newbot, then a display name, then a username ending in bot (for example acme_help_bot).
  3. BotFather replies with a token like 123456789:AAE.... Paste it into your bot's Connect page.

While you're there, /setdescription and /setuserpic make the bot look trustworthy, and /setcommands shows your commands in Telegram's menu.

2. Privacy mode in groups

By default a bot in a group only receives messages that start with /, mention it, or reply to it. That's a privacy feature, but it means keyword answers and anti-spam can't work. To let the bot see every message:

  1. Send /setprivacy to BotFather, pick your bot and choose Disable.
  2. Remove the bot from the group and add it again - the setting only applies when it joins.

Tell your group members the bot reads messages to answer and moderate; it's the honest thing to do.

3. Make it an admin to moderate

To delete spam, the bot must be a group admin with the Delete messages right. Bamboo Bot also checks Telegram's admin list, so rules marked "admins only" (or "ignore admins") follow your group's real admins.

4. Find chat IDs

Group chat IDs are long negative numbers like -1001234567890. The easiest way to get one: add the bot, send any message in the group, and look at the bot's log - every chat that messages it is listed with its ID.

Good first rules for Telegram