buzzk 1.7.1 β 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/lib/chat.js +11 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
## π μ
λ°μ΄νΈ λ΄μ
|
|
19
19
|
|
|
20
|
-
- μ±ν
λ°μ΄ν°μ
|
|
20
|
+
- μ±ν
λ°μ΄ν°μ hasMod νλͺ© μΆκ°
|
|
21
21
|
|
|
22
22
|
>
|
|
23
23
|
|
|
@@ -275,7 +275,7 @@ dotenvμ ν¨κ» μ¬μ©νλ κ²μ λ§€μ° κΆμ₯ν©λλ€.
|
|
|
275
275
|
- id
|
|
276
276
|
- name
|
|
277
277
|
- imageURL
|
|
278
|
-
-
|
|
278
|
+
- hasMod //κ΄λ¦¬ κΆνμ κ°μ‘λμ§ (false / true)
|
|
279
279
|
- message
|
|
280
280
|
- time
|
|
281
281
|
- 1
|
|
@@ -302,7 +302,7 @@ dotenvμ ν¨κ» μ¬μ©νλ κ²μ λ§€μ° κΆμ₯ν©λλ€.
|
|
|
302
302
|
- id
|
|
303
303
|
- name
|
|
304
304
|
- imageURL
|
|
305
|
-
-
|
|
305
|
+
- hasMod //κ΄λ¦¬ κΆνμ κ°μ‘λμ§ (false / true)
|
|
306
306
|
- message
|
|
307
307
|
- time
|
|
308
308
|
- 1
|
package/lib/chat.js
CHANGED
|
@@ -184,7 +184,7 @@ class chzzkChat {
|
|
|
184
184
|
* @property {string} id
|
|
185
185
|
* @property {string} name
|
|
186
186
|
* @property {string} imageURL
|
|
187
|
-
* @property {
|
|
187
|
+
* @property {boolean} hasMod
|
|
188
188
|
*/
|
|
189
189
|
|
|
190
190
|
/**
|
|
@@ -228,17 +228,20 @@ class chzzkChat {
|
|
|
228
228
|
data[o].profile = {
|
|
229
229
|
nickname: null,
|
|
230
230
|
profileImageUrl: null,
|
|
231
|
-
|
|
231
|
+
userRoleCode: null
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
try {
|
|
236
|
+
let modVal = false;
|
|
237
|
+
if (data[o].profile.userRoleCode === "streamer" || data[o].profile.userRoleCode === "streaming_channel_manager" || data[o].profile.userRoleCode === "streaming_chat_manager") modVal = true;
|
|
238
|
+
|
|
236
239
|
msgList[Object.keys(msgList).length] = {
|
|
237
240
|
author: {
|
|
238
241
|
id: data[o].uid,
|
|
239
242
|
name: data[o].profile.nickname,
|
|
240
243
|
imageURL: data[o].profile.profileImageUrl,
|
|
241
|
-
|
|
244
|
+
hasMod: modVal
|
|
242
245
|
},
|
|
243
246
|
message: data[o].msg,
|
|
244
247
|
time: data[o].msgTime
|
|
@@ -315,16 +318,19 @@ class chzzkChat {
|
|
|
315
318
|
data[o].profile = {
|
|
316
319
|
nickname: null,
|
|
317
320
|
profileImageUrl: null,
|
|
318
|
-
|
|
321
|
+
userRoleCode: null
|
|
319
322
|
}
|
|
320
323
|
}
|
|
324
|
+
|
|
325
|
+
let modVal = false;
|
|
326
|
+
if (data[o].profile.userRoleCode === "streamer" || data[o].profile.userRoleCode === "streaming_channel_manager" || data[o].profile.userRoleCode === "streaming_chat_manager") modVal = true;
|
|
321
327
|
|
|
322
328
|
msgList[Object.keys(msgList).length] = {
|
|
323
329
|
author: {
|
|
324
330
|
id: data[o].userId,
|
|
325
331
|
name: data[o].profile.nickname,
|
|
326
332
|
imageURL: data[o].profile.profileImageUrl,
|
|
327
|
-
|
|
333
|
+
hasMod: modVal
|
|
328
334
|
},
|
|
329
335
|
message: data[o].content,
|
|
330
336
|
time: data[o].messageTime
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buzzk",
|
|
3
3
|
"displayName": "BUZZK",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.2",
|
|
5
5
|
"description": "λΏμ§μ§ (BUZZK) - μΉμ§μ§(CHZZK) μ±λ΄μ λμ± μ½κ² κ°λ°ν μ μλλ‘ λλ λΉκ³΅μ λΌμ΄λΈλ¬λ¦¬.",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"type": "commonjs",
|