Bind Telegram Bot
Last updated
Last updated
The portex register
command is used to register a Telegram bot for a specified application. This command allows users to bind a Telegram bot to their application by providing the application name and tg bot token. It verifies with telegram and attempts to register the bot, handling any errors that may occur during the process.
<app-name>
: The name of the application to deploy. This parameter is required.
<bot-token>
: The token of the Telegram bot. This parameter is also required.
Tip: To obtain your bot token, you need to create a new bot using on Telegram. Follow these steps:
Open Telegram and search for "BotFather".
Start a chat with BotFather and use the command /newbot
to create a new bot.
Follow the prompts to set a name and username for your bot.
Once created, BotFather will provide you with a token. Copy this token and use it in the command.
The command will throw an error if the platform is not 'Telegram', indicating that only the Telegram platform supports this command.
If the binding fails, an appropriate error message will be displayed.
Unbind Bot: Not supported; the current version does not support unbinding Telegram bots.