Skip to content

Commit 4b54842

Browse files
committed
chore: update docs
1 parent ec7e325 commit 4b54842

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export type Handler = {
195195
| onWatchedChange | 累计看过人数变化 |
196196
| onLikedChange | 累计点赞人数变化 |
197197
| onRankCountChange | 高能用户人数变化 |
198-
| onUserAction | 用户进入、关注、分享直播间 |
198+
| onUserAction | 用户进入、关注、分享、点赞直播间 |
199199
| onRoomInfoChange | 直播间信息修改 |
200200
201201
<details>
@@ -529,7 +529,7 @@ export interface GuardBuyMsg {
529529

530530
| Handler | Description |
531531
| --- | --- |
532-
| onRoomWarn | 房间被警告/切断 |
532+
| onRoomWarn | 房间被超管警告、切断 |
533533

534534
<details>
535535
<summary>Type Definitions</summary>

src/parser/DANMU_MSG.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ export interface DanmuMsg {
3030
const parser = (data: any, roomId: number): DanmuMsg => {
3131
const rawData = data.info
3232
const content = rawData[1]
33-
// 是否包含中括号
34-
const parseInMessageEmoticon = /\[.*?\]/.test(content)
33+
const shouldParseInMessageEmoticon = /\[.*?\]/.test(content)
3534
let inMessageEmoticon
36-
if (parseInMessageEmoticon) {
35+
if (shouldParseInMessageEmoticon) {
3736
const messageExtraInfo = JSON.parse(rawData[0][15].extra)
3837
const emoctionDict: Record<string, {
3938
id: string

0 commit comments

Comments
 (0)