فارسی

Configuration Reference

Secrets

Secrets are set via wrangler secret put and are never stored in wrangler.toml.

Secret Description
BOT_TOKEN Telegram bot token from @BotFather
BOT_INFO JSON result from Telegram’s /getMe API (the "result" object)

Environment Variables

These are configured in wrangler.toml under the [vars] section.

Variable Type Description Example
LANGUAGE string Bot UI language "fa" or "en"
CHANNEL_ID string Target channel numeric ID "-1002154055412"
CHANNEL_LINK string Channel username (without @) "MyChannel"
CHANNEL_NAME string Channel display name "My Channel"
LOCKED_CHANNELS string (JSON) Array of channel IDs users must join "[-1002154055412]"
OWNER_ID string Bot owner’s Telegram numeric ID "2003287522"
OWNER_USERNAME string Bot owner’s username (without @) "MyUsername"

Tips

Finding a Channel’s Numeric ID

Forward any message from your channel to @userinfobot on Telegram. It will reply with the channel’s numeric ID (a negative number starting with -100).

Getting Bot Info

Open this URL in your browser (replace <TOKEN> with your bot token):

https://api.telegram.org/bot<TOKEN>/getMe

Copy the JSON object inside the "result" field and use it as the BOT_INFO secret.

Inline Queries

For inline query functionality (admin ban/unban management), make sure inline mode is enabled via @BotFather using the /setinline command.


This site uses Just the Docs, a documentation theme for Jekyll.