Skip to content

Commit

Permalink
chore(Comments): reword a few things in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Jan 11, 2023
1 parent 1aedbd3 commit 870b281
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/comments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ A list of comment threads. **Note:** More about comment threads [**here**](./Com

<a name="applysort"></a>
### applySort(sort)
Sorts the comments with the given sort type.
Applies given sort option to the comments.

| Param | Type | Description |
| --- | --- | --- |
| sort | `string` | Sort type. Can be `TOP_COMMENTS`, `NEWEST_FIRST` |
| sort | `string` | Sort option. Can be `TOP_COMMENTS`, `NEWEST_FIRST` |

**Returns:** [`Promise.<Comments>`](../../src/parser/youtube/Comments.ts)

Expand Down
4 changes: 2 additions & 2 deletions src/parser/youtube/Comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ class Comments {
}

/**
* Sorts the comments with the given sort type.
* Applies given sort option to the comments.
* @param sort - Sort type.
*/
async applySort(sort: 'TOP_COMMENTS' | 'NEWEST_FIRST'): Promise<Comments> {
if (!this.header)
throw new InnertubeError('Page header is missing. Cannot apply sort filter.');
throw new InnertubeError('Page header is missing. Cannot apply sort option.');

let button;

Expand Down

0 comments on commit 870b281

Please sign in to comment.