Skip to content
ChartDeck ChartScript docs Account Open the terminal

Telegram members

Give the members of your private Telegram channel or group access to an invite-only script, with a bot of your own.

If you run a private Telegram channel or group, its members can get your invite-only script automatically. They get access while they are in the chat and lose it when they leave. You use your own bot: ChartDeck does not run a bot for you, and it takes no cut of what you charge for the chat.

#What you need

  • A private channel, group or supergroup that you own or administer.
  • A bot made with @BotFather, used only for ChartDeck. A Telegram bot can send its updates to one place only. If the bot already works for something else (a welcome bot, a payment bot), connecting it to ChartDeck takes its updates away from that other service. Make a new bot: it takes a minute.
  • One bot per chat. To connect two chats, make two bots and two connections.

#Set it up

  1. In Telegram, open @BotFather, send /newbot, and pick a name and a username (it must end in bot). BotFather replies with the bot's token, which looks like 123456789:AAH…. Keep it secret: anyone with it controls the bot.
  2. Open your channel or group, add the bot as a member, then make it an administrator. It needs no special rights (you can switch every right off). It just has to be an administrator, because Telegram only tells administrators who joins and leaves.
  3. In ChartDeck, open Account → Selling & access → Integrations, choose Telegram and paste the token. If you know the chat's @username or id (like -1001234567890), you can enter it too. Otherwise ChartDeck picks up the chat as soon as the bot is made an administrator there.
  4. ChartDeck checks the token with Telegram, and points the bot's updates at ChartDeck. If the bot already sends its updates somewhere else, ChartDeck stops and asks you first. Tick Replace the bot's webhook only if that bot is really meant for ChartDeck.
  5. When the connection shows your chat's name, map Members of (your chat's name) to one or more invite-only scripts. Choose how long access lasts:
    • While a member (the usual choice): access lasts while they are in the chat, plus any grace days you set after they leave.
    • Fixed term: each time someone joins they get 1 month, 3 months, 1 year or lifetime, and leaving changes nothing.

ChartDeck keeps the token encrypted and only ever shows its last 4 characters. To change it (for example after /revoke in BotFather), use Update credentials on the connection. Your chat and your mappings stay the same.

Telegram does not tell bots who people are on other sites, so each member links their Telegram account to ChartDeck once:

  1. In ChartDeck they open Account → Connections and press Link Telegram. They get a one-time code like CDL-ABCD-EFGH, valid for 10 minutes.
  2. They open your bot (your script's listing has a button that opens it with the code filled in) and press Start, or send the code to the bot.
  3. The bot replies, and if they are in your chat, their access turns on straight away.

A member links once. If they later join another author's chat, that author's bot finds them too.

#What updates access

  • Someone joins the chat, or leaves or is removed: access turns on or ends within seconds.
  • Restricted members who are still in the chat count as members. People who left or were banned do not.
  • If you remove the bot from the chat or take away its administrator role, the connection shows an error and nothing changes until you make it an administrator again.
  • Disconnecting the integration removes the bot's webhook and ends all the access it gave. Access you gave in other ways (grants, invites, purchases) is never touched.

#Limits

  • Telegram has no member list for bots. ChartDeck cannot read who is already in your chat. It learns about members when they join or leave while the bot is an administrator, when they link their account, and from a regular re-check. Every 15 minutes it checks everyone who currently has access through the chat. Once a day it also goes through the linked Telegram accounts, up to 2,000 checks a run.
  • If ChartDeck missed a join (for example someone joined before the bot was an administrator), the member can link again, or you can press Sync on the connection.
  • The bot only answers private messages that contain a link code, plus a short help text. It ignores messages in your chat.

#Privacy

ChartDeck stores the member's Telegram user id and @username (or first name) with their ChartDeck account, nothing else from Telegram. You see how many members have access through the connection and its event log. You do not see their ChartDeck email address.

The ChartScript documentation is in English for now; translations will follow.