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 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.0",
4
+ "version": "1.9.1",
5
5
  "description": "λΏŒμ§€μ§ (BUZZK) - μΉ˜μ§€μ§(CHZZK) 챗봇을 λ”μš± μ‰½κ²Œ κ°œλ°œν•  수 μžˆλ„λ‘ λ•λŠ” 비곡식 라이브러리.",
6
6
  "main": "lib/index.js",
7
7
  "type": "commonjs",