# Members and mentions


```sh
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 `null` list 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.
- `self` is marked only if LINE returns you, and no member is ever invented.

## Mentions

`--mentions` takes a JSON array of up to 100 spans:

- `start` is inclusive and `end` exclusive, counted in UTF-16 code units of the
  exact text. `😀` counts as two units.
- Each span needs either a full user `mid` or `"all": true`. Mention-all needs a
  group or room.
- Spans can't overlap or split a surrogate pair.
- Typing `@name` in 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:

```sh
printf '%s' '😀 @Alex' | line send "Family group" --stdin --reply-to MESSAGE_ID --mentions '[{"start":3,"end":8,"mid":"USER_MID"}]' --json
```


---
Source: https://kongesque.github.io/line-cli/guides/members/
