Members and mentions
line members "Family group" --json
line members "Family group" --timeout 30s
line send "Family group" --text '😀 @Alex' --mentions '[{"start":3,"end":8,"mid":"USER_MID"}]'
line send "Family group" --text '@All hello' --mentions '[{"start":0,"end":4,"all":true}]'members lists a group's current members and invitees separately, sorted by
MID. Use a MID from it wherever a command asks for USER_MID. It supports
--timeout and --error-format=json, and it never negotiates or registers
encryption keys or sends read receipts.
Direct chats aren't supported. Legacy multi-person rooms (r...) are, and
always report invitees: [] with invitees_complete: true.
Member JSON#
Each entry has mid, the display name (null if unavailable), name_status
(resolved or unavailable), and self. The schema_version: 1 envelope also
has chat, members_complete, and invitees_complete.
- A list that is present and empty is complete; an omitted or
nulllist is incomplete. - Completeness describes the membership response, not profile availability or later changes.
- A failed profile lookup leaves the name unavailable but keeps the member.
selfis marked only if LINE returns you, and no member is ever invented.
Mentions#
--mentions takes a JSON array of up to 100 spans:
startis inclusive andendexclusive, counted in UTF-16 code units of the exact text.😀counts as two units.- Each span needs either a full user
midor"all": true. Mention-all needs a group or room. - Spans can't overlap or split a surrogate pair.
- Typing
@namein the text doesn't create a mention. - Mentions work with
--text,--stdin, and--reply-to, but not with--file,--image, or a prompted message.
Invalid mentions are rejected before the session is opened. The usual single-attempt and encryption rules apply. Mention data stays outside the encrypted text, as in LINE for Chrome.
In a script, keep the offsets aligned with the unmodified stdin text:
printf '%s' '😀 @Alex' | line send "Family group" --stdin --reply-to MESSAGE_ID --mentions '[{"start":3,"end":8,"mid":"USER_MID"}]' --json