Skip to content

Commit

Permalink
feat: rename command name
Browse files Browse the repository at this point in the history
  • Loading branch information
uetchy committed May 27, 2022
1 parent 1634c1f commit 6e08427
Show file tree
Hide file tree
Showing 8 changed files with 3,040 additions and 4,220 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.vscode
.envrc
package-lock.json
yarn.lock
/dist

# Created by https://www.toptal.com/developers/gitignore/api/node
Expand Down
67 changes: 24 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,70 +9,51 @@ See YouTube Live Chat through a flexible filtering engine. For a desktop app, se

```bash
npm i -g masterchat-cli

masterchat --help
# or
mc --help
```

## Use

```bash
mc live <video ID or URL> # mimic live chat
mc events [video ID or URL] # print all observed events from all the VTubers
mc pbd # protobuf inspector
```

### `live`

#### Options
### `print`

- `--type <string>`: Chat type (`top` or `all`)
- `--mod`: Show moderation events
- `--author`: Show author name
- `--filter <string>`: Filter rule

#### Useful Filter Rules

Only show moderators' chat:
Print live/replay chats.

```bash
--filter isModerator
mc print <video ID or URL>
mc print WpjhEqjngRQ --filter 'isSuperchat && color === "green"' --author # Only show green super chats
mc print WpjhEqjngRQ --filter 'isMember' # Only show chats from members
mc print WpjhEqjngRQ --filter 'isModerator || isVerified || isOwner' --author # Print chats from moderators/verified accounts/channel owner
mc print WpjhEqjngRQ --filter '/^(\\[[a-z]+?\\]|[a-z]+?: )/i.test(message)' # Print live translations
mc print WpjhEqjngRQ --filter 'message.includes("草")' # Only show chat contains 草
```

Only show chat from verified account or channel owner:

```bash
--filter 'isVerified || isOwner'
```

Only show super chat:

```bash
--filter superchat
```
#### Options

Only show red super chat:
- `--type, -t <string>`: Chat type (`top` or `all`)
- `--author, -a`: Show author name
- `--filter, -f <string>`: Filter chat/superchat events
- `--mod, -m`: Print moderation events
- `--verbose, -v`: Print additional info
- `--collect, -c`: Save received actions as JSONLines (.jsonl)

```bash
--filter 'superchat && superchat.color == "red"'
```
### `watch`

Only show membership chat:
Print all events except live chats.

```bash
--filter membership
mc watch
mc watch --org Hololive
mc watch WpjhEqjngRQ
```

Only show live translations:

```bash
--filter '/^(\\[[a-z]+?\\]|[a-z]+?: )/i.test(message)'
```
### `pbd`

Only show chat contains 草:
pb params decoder.

```bash
--filter 'message.includes("草")'
mc pbd 'EglwbGF5bGlzdHM%3D'
```

## Community
Expand Down
Loading

0 comments on commit 6e08427

Please sign in to comment.