Telegram
How to build a Telegram Bot
Steps to create a new bot:
- Open the Telegram app and search for the BotFather bot.
- Start a chat with BotFather by clicking the "Start" button.
- Send the command
/newbot
to BotFather to create a new bot. - Follow the instructions from BotFather and provide a name and username for your bot.
- After creating the bot, BotFather will provide you with a token.
- To test your bot, open a chat with your bot by searching for its username and send a message.
- You can also customize your bot by sending commands to BotFather, such as
/setdescription
and/setuserpic
.
Optionally, you can also create a channel for publishing.
Configuration
After creating a new bot, you will have the Bot API Token
.
Next, place these keys in the environment or configuration file:
WAYBACK_TELEGRAM_TOKEN
: Bot API Token.WAYBACK_TELEGRAM_CHANNEL
: Channel ID for publishing (optional).WAYBACK_TELEGRAM_HELPTEXT
: Provide a help message for users to reference (optional).