Guides › Telegram
How to make a Telegram bot
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
- In Telegram, open a chat with @BotFather (check the blue verified tick).
- Send
/newbot, then a display name, then a username ending inbot(for exampleacme_help_bot). - 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:
- Send
/setprivacyto BotFather, pick your bot and choose Disable. - 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
- A welcome message for new group members.
- FAQ answers for the questions newcomers always ask.
- Flood protection: more than 6 messages in 10 seconds gets a warning.
- A daily or weekly pinned-style reminder.