Group and channel administration

Members, invitations, permissions and moderation for groups and channels. Actions require the relevant permissions.

This reference covers group administration commands. Use it to look up member, invitation, permission and moderation options before making a change.

Members, invitations, permissions and moderation for groups and channels. Actions require the relevant permissions.

Options for every command

OptionWhat it does
-V, --versionoutput the version number.
-v, --verbosemore detail in what is shown: -v ids, -vv everything we know. Default: 0.
--jsonmachine-readable output: one JSON value on stdout, nothing else.
--jsonlmachine-readable output: one JSON object per line, for streaming and jq.
--quietdiagnostics off; a failure is still said.
--tracethe connection's own log lines on stderr — never message content.
--timeout <duration>give up on the whole command after this — 30s, 2m, 500ms.
--offlineanswer from what was recorded and never connect; fails if nothing was.
--no-inputnever prompt or open interactive login; piped input remains available.
--max-input-bytes <bytes>maximum buffered input bytes (default: 16777216).
--max-output-bytes <bytes>maximum machine output bytes (default: 4194304; 0 disables).
--fields <paths>comma-separated item or object fields: id,text; preserve pagination and operation ids.
--dry-runpreview parsed arguments and permissions before running the action.
--yesgo ahead without the question an ask level puts before a write.
--recordkeep this run — ids and timings, never message content.
--no-recorddo not keep it, whatever the configuration says.

Commands

tg chats members

who is in a group

tg chats members list

everyone in a group, a page at a time, with their role and when they were last seen

tg chats members list <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--limit <n>how many to show.
--page <n>which page, starting at 1.
--allevery row, no paging.

tg chats members audit

members that look like bots, each with its reasons, from the member list and local store; --deep checks selected people individually; removes nobody

tg chats members audit <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--budget <pages>at most this many pages of 200 members, a pause between them (default: 10).
--min-score <n>only members scoring at least this; 1 lists everyone with a reason (default: 2).
--deep <n>also check the top n profiles, oldest photos, up to 1,000 stored messages each and public ban lists, which are sent their ids — one person a second.

tg chats members history

who joined, who left and whose profile changed, oldest first — what chats members fetch recorded in the local store; never asks the messenger

tg chats members history <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--since-time <time>ISO 8601, or 2h / 1d ago; everything recorded if not given.

tg chats members fetch

read a group's whole member list into the local store's member history: who joined, who left, daily counts and profile changes; someone is recorded as gone only when every member was read

tg chats members fetch <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--trackalso fetch it daily while serve runs; chats tracking lists and edits those chats.
--budget <pages>at most this many pages of 200 members, a pause between them (default: 10).

tg chats members add

add people; they are told

Changes something in Telegram.

tg chats members add <chat> <person>
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
personrequiredan id, or part of a name.

tg chats members remove

remove people; their messages stay

Changes something in Telegram.

tg chats members remove <chat> <person>
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
personrequiredan id, or part of a name.

tg chats create

create a group or a channel; the people added are told

Changes something in Telegram.

tg chats create <title> [person] [options]
ArgumentRequirementWhat it is
titlerequiredthe group's name.
personoptionalpeople to add: an id, or part of a name.
OptionWhat it does
--channela private channel instead of a group; people join it by its link.

tg chats update

rename a group or channel, change its description, or turn one of its settings on or off

Changes something in Telegram.

tg chats update <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--title <title>the new name.
--description <text>the new description.
--all-can-pin <on|off>every member may pin messages.
--only-admins-add <on|off>only admins may add members.
--join-approval <on|off>people ask to join, and an admin lets them in.

a group's invite link

the invite link, if you may see it

tg chats link show <chat>
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.

make another invite link; nobody is told until you share it

Changes something in Telegram.

tg chats link create <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--approvalwho joins by it asks first, and an admin lets them in; it then has no use limit.
--expire-time <time>it stops working then: 2026-09-25T09:00 (local time), or 30m, 2h, 7d from now.
--max-uses <n>at most this many people join by it, 1 to 99999.

your invite links, newest first, with how many joined and how many wait

tg chats link list <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--revokedthe links you stopped, instead.
--limit <n>how many.

stop one link; for the group's own link, the answer is the new one

Changes something in Telegram.

tg chats link revoke <chat> <link>
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
linkrequiredthe link, as chats link list shows it.

change one of your invite links, the group's own one too

Changes something in Telegram.

tg chats link update <chat> <link> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
linkrequiredthe link, as chats link list shows it.
OptionWhat it does
--approvalwho joins by it asks first, and an admin lets them in; it then has no use limit.
--no-approvalanyone with it joins at once.
--expire-time <time>it stops working then: 2026-09-25T09:00 (local time), or 30m, 2h, 7d from now; never takes the expiry away.
--max-uses <n>at most this many people join by it, 1 to 99999.

replace the invite link; the old one stops working

Changes something in Telegram.

tg chats link reset <chat>
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.

tg chats requests

requests to join a group that needs an admin's approval

tg chats requests list

who asked to join, newest first; only admins see them, and reading tells nobody

tg chats requests list <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--limit <n>how many.
--search <text>only people whose name or @username has this.
--link <link>only people who asked through this invite link; not with --search.

tg chats requests accept

let them in; the group sees them join

Changes something in Telegram.

tg chats requests accept <chat> [person] [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
personoptionalwho asked: an id from chats requests list.
OptionWhat it does
--allevery pending request, counted against the hourly limit first.
--link <link>with --all: only the requests made by this invite link.

tg chats requests decline

turn the request away

Changes something in Telegram.

tg chats requests decline <chat> [person] [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
personoptionalwho asked: an id from chats requests list.
OptionWhat it does
--alldecline every pending request; declining does not count toward the hourly sending limit.
--link <link>with --all: only the requests made by this invite link.

tg chats admins

give or take back a member's admin rights

tg chats admins add

make a member an admin with these rights

Changes something in Telegram.

tg chats admins add <chat> <person> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
personrequiredan id, or part of a name.
OptionWhat it does
--can <rights>what they may do, comma-separated: members, admins, info, pin, link, post, edit, delete.

tg chats admins remove

take an admin's rights back; they stay a member

Changes something in Telegram.

tg chats admins remove <chat> <person>
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
personrequiredan id, or part of a name.

tg chats moderate

judge a group's new messages and members by its rules, and act as they allow

Changes something in Telegram.

tg chats moderate <chat> [options]
ArgumentRequirementWhat it is
chatrequireda chat: its title or part of it, its id, @username, or me for Saved Messages.
OptionWhat it does
--since-time <time>judge what came after this ISO 8601 time, or 2h / 1d ago; the saved point stays.
--dry-runjudge and plan; do nothing.
--allow-dangerousyes to every action whose level in the group's rules is ask.
--max-actions <n>at most this many actions in one run; 10 if not given.

Exit codes

Branch on the code, not on the text: the text can change, the code does not.

CodeWhen
0it worked
2validation_error
3configuration_error
4authentication_error
5permission_error
6not_found
7confirmation_required
8rate_limited
9timeout
10network_error
11provider_error
12provider_unavailable
13invalid_response
14outcome_unknown
130cancelled
1anything else

0 and only 0 means the operation was done. 14 (outcome_unknown) means a message may have gone: repeat it only with the same --send-id, which Telegram uses to drop a second copy.