Skip to content

Latest commit

Β 

History

History
163 lines (117 loc) Β· 4.98 KB

File metadata and controls

163 lines (117 loc) Β· 4.98 KB

slick react

Add, remove, or list emoji reactions on a known message. Requires reactions:write for mutating commands and reactions:read for list.

react add / react remove

=== "Single emoji"

Add or remove one reaction:

```sh
slick react add    --channel C1234567890 --timestamp 1746284582.123456 --emoji :thumbsup:
slick react remove --channel C1234567890 --timestamp 1746284582.123456 --emoji :thumbsup:
```

=== "Multiple emoji"

Apply or remove several emoji in order, left-to-right:

```sh
slick react add --channel C1234567890 --timestamp 1746284582.123456 \
  --emoji thumbsup,white_check_mark,rocket
```

=== "Dry run"

Preview without mutating:

```sh
slick react add --channel C1234567890 --timestamp 1746284582.123456 \
  --emoji :thumbsup: --dry-run
```

Flags

??? note "Flags"

| Flag | Value | Description |
|------|-------|-------------|
| `-c`, `--channel` | `<CHANNEL>` | Channel ID, name, or alias |
| `-t`, `--timestamp` | `<TS>` | Message timestamp |
| `-e`, `--emoji` | `<NAME>…` | Emoji name; repeat or comma-separate to apply multiple in order |
| `-n`, `--dry-run` | | Preview without mutating |

Emoji names accept both thumbsup and :thumbsup: forms.

!!! warning "Ordered multi-emoji" Ordered multi-emoji halts on the first failure; data.mutations[] is absent on the error envelope, so retry the remaining emojis from a known-good state rather than assuming partial success.

Output

=== "Human"

Human (real, single emoji β€” no `dry_run` field):

```text
Reaction added channel=C7N2Q8L4P ts=1746284582.123456 emoji=thumbsup
```

Human (`--dry-run`, single emoji):

```text
Reaction added channel=C7N2Q8L4P ts=1746284582.123456 dry_run=true emoji=thumbsup
```

Human (real, multiple emoji β€” one event line per emoji, in argument order):

```text
Reaction added channel=C7N2Q8L4P ts=1746284582.123456 emoji=rocket
Reaction added channel=C7N2Q8L4P ts=1746284582.123456 emoji=white_check_mark
```

Human (`react remove`):

```text
Reaction removed channel=C7N2Q8L4P ts=1746284582.123456 emoji=thumbsup
```

=== "JSON"

JSON envelope:

```json
{
  "data": {
    "mutations": [
      {"channel": "C7N2Q8L4P", "ts": "1746284582.123456", "emoji": "thumbsup", "dry_run": true}
    ],
    "target": {"channel": "C7N2Q8L4P", "ts": "1746284582.123456"}
  }
}
```

meta.command (react.add vs react.remove) distinguishes the two paths. The removed action-result bool was dropped in v0.4.0; the action label and errors[] carry the same signal.

react list

slick react list --channel C1234567890 --timestamp 1746284582.123456

Flags

??? note "Flags"

| Flag | Value | Description |
|------|-------|-------------|
| `-c`, `--channel` | `<CHANNEL>` | Channel ID, name, or alias |
| `-t`, `--timestamp` | `<TS>` | Message timestamp |

Output

=== "Human"

Human mode renders a primer table:

```text
EMOJI             COUNT  USERS
thumbsup          3      U123,U456,U789
white_check_mark  1      U123
```

=== "JSON"

JSON envelope. The Slack API normalises some emoji aliases to their
canonical names in the response (e.g. `thumbsup` β†’ `+1`, `thumbsdown` β†’ `-1`);
the `name` field reflects the canonical Slack form, not necessarily the alias
you passed to `react add`:

```json
{
  "data": {
    "reactions": [
      {"name": "+1", "count": 3, "users": ["U123", "U456", "U789"]},
      {"name": "white_check_mark", "count": 1, "users": ["U123"]}
    ],
    "target": {"channel": "C1234567890", "ts": "1746284582.123456"}
  }
}
```

Common errors

Error Cause Fix
invalid_name: Slack does not recognize that emoji name (validation, exit 4) The emoji name is not a custom workspace emoji and not a recognised Slack default. Check spelling; try with/without colons; verify in the Slack composer.
already_reacted (validation, exit 4) This emoji is already on the message from the same user. Skip; treat as idempotent success at the caller.
no_reaction (not_found, exit 2) react remove cannot find that emoji on the message. Confirm with react list before removing.
too_many_reactions (validation, exit 4) Slack message reaction limit reached. Cannot work around; surface to user.
not_in_channel (not_found, exit 2) App/user is not a member of the target channel. Add the bot, or use a user-token profile.

See also