The bot can sit in a Telegram group with people you have allowed. It does not answer every line. Most lines get silence. It never posts “not allowed” in the group. Channels are not supported. A private chat is unchanged. See How chat works and Access.

Add the group

You need three things:
  • The group id (a negative number).
  • The user id of every human in the group, including you.
  • The node (working folder) this group should use.
telekit group add --id=-1001234567890 --member 111 --member 222 --node me --label family
telekit group list
Write the id as --id=-100…. A bare -100… is read as a flag and the command fails. Repeat --member once per person. Do not list the bot itself. --label is a name for your own list. --node is required. --profile picks a bot other than the default. Each bot has its own list.
telekit group add-member --id=-1001234567890 333
telekit group rm-member --id=-1001234567890 333
telekit group ignore-bot --id=-1001234567890 999
telekit group rm --id=-1001234567890
Add a person who joins. Remove a person who leaves. Remove the whole group with group rm. In a private chat, the owner can send /group to see the same list: id, label, chime, node, and member ids.

Find the ids

Each person. They open a private chat with this bot and send /whoami. Use the Chat number. It is positive. The group. Copy a message link.
  • A link like https://t.me/c/1234567890/10 means the id is --id=-1001234567890. Put -100 in front of the number after /c/.
  • In Telegram Web, the open chat address often ends in the id itself, already starting with -100.
A link like https://t.me/some_name/10 is a public name. It does not contain the numeric id. Use a link that contains /c/, or the -100… id from Telegram Web.

Member count

Telegram does not give the bot a member list. Telekit checks a count instead. telekit group list prints Telegram’s count and the count it expects: people you listed + this bot + bots you named with ignore-bot. Those two numbers must match. If they do not, the line says mismatch and the bot stays silent. A person who is in the group but not listed breaks the count. A listed person who has left breaks it too. Another bot that was already in the group breaks it until you add that bot’s id with ignore-bot. The check runs again when someone joins or leaves, and about every 10 minutes otherwise. If Telegram cannot be reached, the bot stays silent.

Privacy mode

Privacy mode is a per-bot setting in BotFather. It is on by default. While it is on, the bot in a group only sees commands, @mentions, replies to itself, and join or leave notices. It cannot decide when to speak. Turn it off for the bot you add to the group:
  1. Open BotFather.
  2. Send /setprivacy.
  3. Choose the bot.
  4. Choose Disable.
If that bot was already in the group while privacy was on, remove it and add it again. If you turn privacy off before the bot joins, you do not need to re-add it. The bot does not need to be a group admin. Do not make it an admin. Admin rights can delete messages, ban people, and change the group. This bot never uses those rights. Privacy off applies to every group that bot is in. A group that is not on the allow list is still ignored.

Which folder it uses

--node is fixed for that group. The group does not follow /node from your private chat. It uses that node’s default thread only. The group has its own session, separate from every private chat. It uses the harness this Mac was set up with. /harness in a private chat does not change the group. You cannot switch node, thread, or harness from inside the group. A daemon restart makes the bot quiet until someone speaks again. The group’s agent thread is kept. The allow list and the chime mode are kept.

When it speaks

Three things get an answer immediately:
  • An @mention of this bot.
  • A reply to one of this bot’s messages.
  • A command this bot does not reserve (an unknown /foo starts an answer).
Any other text waits until the group has been quiet for about 20 seconds. A new ordinary line restarts that wait. The check then picks one posture:
PostureWhat the bot does
AnswerAnswers the group.
AsideSpeaks on a short fact the group just got wrong.
Ask firstSpeaks to ask whether the group wants input.
WaitThe people are still talking. It may wait through two quiet gaps, then drop it.
SilentSays nothing. No agent turn starts.
Silence is normal. The check prefers it. If the check is unsure, slow, or unreachable, the bot stays silent. On its own, the bot speaks at most 3 times an hour. An @mention, a reply, or a command does not count toward those 3. Unprompted speech needs a Jev key. Set it with telekit jev set-key (same key as Mac app Settings › Agent). telekit group list prints jev key: missing when it is not set. Without the key, the bot only answers a command, an @mention, or a reply.

/chime

/chime works in the group only. It is saved for that group. Bare /chime shows the current mode.
ModeBehavior
normalDefault. The table above.
quietSpeaks on its own only for a real answer. No aside. No “want me to weigh in?”
offNo unprompted speech. Commands, @mentions, and replies still get an answer.
In a private chat, /chime replies that chime is for a group.

Commands that work in a group

CommandIn a group
/stop, /xCancel this group’s running turn.
/status, /sLane snapshot.
/chimeShow or set this group’s mode.
@mention, reply, unknown /fooStart an answer now.
/restart, /node, /harness, /skill, /pw, /help, /group, and the other owner commandsIgnored. No reply.
/group is owner-only, and only in a private chat. The group is not behind the passcode. /pw in the group does nothing.

What a group turn can do

The bot is a member of the group, not the owner. Every line is untrusted, including yours. A group turn can read. It can look up files in the group’s node and look things up on the web. It replies in text, in the group. It cannot edit files, run shell commands, start other agents, send files, or message anyone outside the group. A second message does not steer a turn that is already running. A new @mention or reply starts its own answer after that.

Photos, files, and voice

A photo, file, or voice note in the group is ignored, unless that message also @mentions the bot or replies to it. When the message does mention or reply, the bot sees the words (the caption). It does not receive the file. Voice notes in a group are not transcribed. Send those in the private chat. See Voice notes and Files. An anonymous admin message has no person id. The bot ignores it.

When it stays silent

Check these in order:
  1. telekit group list — the group is listed, and the two counts match.
  2. Every human currently in the group is a --member. Nobody who left is still listed.
  3. Other bots are on ignore-bot.
  4. Privacy mode is off for this bot. If it was already in the group, it was removed and added again.
  5. The node you set still exists on this Mac.
  6. For unprompted speech: chime is not off, and jev key is not missing.
  7. You are not past 3 unprompted replies in the last hour. An @mention still works.
The bridge log is ~/.telekit/bridge.log. A skipped group line looks like dropped:group-unknown, dropped:sender-unknown, or dropped:roster-mismatch. A photo or file with no mention looks like dropped:group-media. An owner command in the group looks like dropped:group-command.