Creating Telegram BotFather
BotFather is the one bot to rule them all. It will help you create new bots and change settings for existing ones.
Step 1 - Accessing BotFather
Open Telegram Apps from your smartphone. Search for BotFather on your Telegram contact and start your conversation with him.
Step 2 - Create A New Bot
/newbot command to create a new bot. The BotFather will ask you for a name and username, then it will generate an authorization token for your new bot.
- The Name of your bot will be displayed in contact details and elsewhere.
- The Username is a short name, to be used in mentions and telegram.me links. Usernames are 5-32 characters long and are case insensitive, but may only include Latin characters, numbers, and underscores. Your bot's username must end in ‘bot’, e.g. ‘tetris_bot’ or ‘TetrisBot’.
- The Token is a string along the lines of
110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsawthat will be required to authorize the bot and send requests to the Bot API.
Step 3 - Generate An Authorization Token For Your Bot
If your existing token is compromised or you lost it for some reason, use the
/token command to generate a new one.
Step 4 - Bot Privacy
You will need to disable the privacy for the bot. Use the
/setprivacy command and set it to
disable so that your bot will receive all messages that people send to groups.
And that's about it.
Extra Edit Settings
The remaining commands are pretty self-explanatory:
/setname- change your bot's name.
/setdescription- changes the bot's description, a short text of up to 512 characters, describing your bot. Users will see this text at the beginning of the conversation with the bot, titled ‘What can this bot do?’.
/setabouttext- changes the bot's about info, an even shorter text of up to 120 characters. Users will see this text on the bot's profile page. When they share your bot with someone, this text will be sent together with the link.
/setuserpic- changes the bot‘s profile pictures. It’s always nice to put a face to a name.
/setcommands- changes the list of commands supported by your bot. Each command has a name (must start with a slash ‘/’, alphanumeric plus underscores, no more than 32 characters, case-insensitive), parameters, and a text description. Users will see the list of commands whenever they type ‘/’ in a conversation with your bot.
/setjoingroups- determines whether your bot can be added to groups or not. Any bot must be able to process private messages, but if your bot was not designed to work in groups, you can disable this.
/setprivacy- determines which messages your bot will receive when added to a group. With privacy mode disabled, the bot will receive all messages. We recommend leaving privacy mode enabled.
/deletebot- deletes your bot and frees its username.
Please note, that it may take a few minutes for changes to take effect.