【英文】创建TelegramBot
Introduction
Create a Telegram Bot
Create a Bot
- Visit the @BotFather bot and follow the instructions to create your own bot.
Use /start
to view the usage instructions.
1 | I can help you create and manage Telegram bots. If you're new to the Bot API, please see the manual. |
Use /newbot
to create a new bot.
1 | Alright, a new bot. How are we going to call it? Please choose a name for your bot. |
Enter the name of the bot as prompted, which will serve as the bot’s account username.
1 | Good. Now let's choose a username for your bot. It must end in `bot`. Like this, for example: TetrisBot or tetris_bot. |
Enter the external name of the bot as prompted, which will be the name used for the sharing link. The name must end with _bot
.
<name>
: external name of the bot0000000000:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
: API Key
1 | Done! Congratulations on your new bot. You will find it at t.me/<name>_bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this. |
Once created, use the API Key
in your code to interact with the Telegram Bot.
View Bots
Use /mybots
to view all bots.
Delete Bot
Use /mybots
to view all bots, select the bot you want to delete -> Delete Bot
-> Yes, delete the bot
-> Yes, I'm 100% sure!