buzzk 1.9.0 β 1.9.1
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 +5 -1
- package/lib/chat.js +5 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
|
|
18
18
|
## π μ
λ°μ΄νΈ λ΄μ
|
|
19
19
|
|
|
20
|
+
- μ±ν
μ±λ μ°κ²°μ μ μ§νμ§ λͺ»νλ λ¬Έμ μλ²½ ν΄κ²°
|
|
21
|
+
|
|
22
|
+
>
|
|
23
|
+
|
|
20
24
|
- video ν¨μ μΆκ°
|
|
21
25
|
|
|
22
26
|
>
|
|
@@ -376,7 +380,7 @@ dotenvμ ν¨κ» μ¬μ©νλ κ²μ λ§€μ° κΆμ₯ν©λλ€.
|
|
|
376
380
|
|
|
377
381
|
### video
|
|
378
382
|
|
|
379
|
-
const videoList = await buzzk.video.getList("channelID κ°");
|
|
383
|
+
const videoList = await buzzk.video.getList("channelID κ°", 24); //channelID κ°, κ°μ Έμ¬ κ°―μ
|
|
380
384
|
console.log(videoList);
|
|
381
385
|
|
|
382
386
|
<details>
|
package/lib/chat.js
CHANGED
|
@@ -35,6 +35,10 @@ class chzzkChat {
|
|
|
35
35
|
if (myInfo.code != 200) return resolve(null);
|
|
36
36
|
this.#uid = myInfo.content.userIdHash;
|
|
37
37
|
|
|
38
|
+
//SetPolling
|
|
39
|
+
if (!this.#pollingStatus) this.#polling();
|
|
40
|
+
//SetPolling
|
|
41
|
+
|
|
38
42
|
//Get ChatID
|
|
39
43
|
let cidRes = await getStatus(this.channelID);
|
|
40
44
|
if (!cidRes) return resolve(null);
|
|
@@ -56,10 +60,6 @@ class chzzkChat {
|
|
|
56
60
|
this.#ws = new WebSocket("wss://kr-ss" + this.#ssID + ".chat.naver.com/chat");
|
|
57
61
|
//Connect Web Socket
|
|
58
62
|
|
|
59
|
-
//SetPolling
|
|
60
|
-
if (!this.#pollingStatus) this.#polling();
|
|
61
|
-
//SetPolling
|
|
62
|
-
|
|
63
63
|
//WS Open
|
|
64
64
|
this.#ws.on("open", () => {
|
|
65
65
|
console.log("[WS] Connected!");
|
|
@@ -194,8 +194,6 @@ class chzzkChat {
|
|
|
194
194
|
* @param {function(chzzkMessages)} callback
|
|
195
195
|
*/
|
|
196
196
|
onMessage(callback) {
|
|
197
|
-
if (!this.#ws) return callback(null);
|
|
198
|
-
|
|
199
197
|
this.#callbacks[Object.keys(this.#callbacks).length] = {
|
|
200
198
|
type: "message",
|
|
201
199
|
callback: callback
|
|
@@ -266,8 +264,6 @@ class chzzkChat {
|
|
|
266
264
|
}
|
|
267
265
|
|
|
268
266
|
onDonation(callback) {
|
|
269
|
-
if (!this.#ws) return callback(null);
|
|
270
|
-
|
|
271
267
|
this.#callbacks[Object.keys(this.#callbacks).length] = {
|
|
272
268
|
type: "donation",
|
|
273
269
|
callback: callback
|
|
@@ -473,7 +469,7 @@ class chzzkChat {
|
|
|
473
469
|
}
|
|
474
470
|
|
|
475
471
|
async #polling () {
|
|
476
|
-
if (!this.#ws) return this.#pollingStatus = false;
|
|
472
|
+
//if (!this.#ws) return this.#pollingStatus = false;
|
|
477
473
|
this.#pollingStatus = true;
|
|
478
474
|
|
|
479
475
|
//Get ChatID
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buzzk",
|
|
3
3
|
"displayName": "BUZZK",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.1",
|
|
5
5
|
"description": "λΏμ§μ§ (BUZZK) - μΉμ§μ§(CHZZK) μ±λ΄μ λμ± μ½κ² κ°λ°ν μ μλλ‘ λλ λΉκ³΅μ λΌμ΄λΈλ¬λ¦¬.",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"type": "commonjs",
|