@satorijs/adapter-telegram
Setup
- Search for @botfather (with the official verification badge) and open the chat
- Send
/startto see the menu, which you can use to configure your bot - To create a bot, click
/newbotand follow the prompts - Use
/setprivacyto disable Privacy Mode (set to DISABLED, otherwise the bot can only receive specific messages) - After creation, you'll receive a token (do not disclose it). Use it as your bot configuration
Reference: https://core.telegram.org/bots
TIP
If your bot cannot receive messages without / after startup, Privacy Mode is likely not disabled. If it still doesn't work after disabling, try removing the bot from the group and re-adding it.
Bot Options
options.protocol
- Values: server, polling
The protocol type to use.
options.token
- Type:
string
The bot account token.
options.slash
- Type:
boolean - Default:
true
Whether to enable slash commands.
options.files.endpoint
- Type:
string
The endpoint for file requests.
options.files.local
- Type:
boolean - Default:
false
Whether to enable Telegram Bot API local mode.
HTTP Options
options.path
- Type:
string - Default:
'/telegram'
The path the server listens on.
options.selfUrl
- Type:
string
The public URL of the server.