buzzk 1.6.1 → 1.6.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.
Files changed (2) hide show
  1. package/lib/chat.js +3 -2
  2. package/package.json +1 -1
package/lib/chat.js CHANGED
@@ -36,6 +36,7 @@ class chzzkChat {
36
36
 
37
37
  //Get ChatID
38
38
  let cidRes = await getStatus(this.channelID);
39
+ if (!cidRes) return resolve(null);
39
40
  this.#chatID = cidRes.chatID;
40
41
  //Get ChatID
41
42
 
@@ -348,7 +349,7 @@ class chzzkChat {
348
349
 
349
350
  //Get ChatID
350
351
  let cidRes = await getStatus(this.channelID);
351
- if (cidRes.chatID && cidRes.chatID != this.#chatID) {
352
+ if (cidRes && cidRes.chatID && cidRes.chatID != this.#chatID) {
352
353
  this.#chatID = cidRes.chatID;
353
354
 
354
355
  //Reconnect
@@ -364,7 +365,7 @@ class chzzkChat {
364
365
  //Get ChatID
365
366
 
366
367
  let interval;
367
- if (cidRes.polling && cidRes.polling.callPeriodMilliSecond) interval = cidRes.polling.callPeriodMilliSecond;
368
+ if (cidRes && cidRes.polling && cidRes.polling.callPeriodMilliSecond) interval = cidRes.polling.callPeriodMilliSecond;
368
369
  else interval = 10000;
369
370
 
370
371
  setTimeout(() => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzk",
3
3
  "displayName": "BUZZK",
4
- "version": "1.6.1",
4
+ "version": "1.6.2",
5
5
  "description": "뿌지직 (BUZZK) - 치지직(CHZZK) 챗봇을 더욱 쉽게 개발할 수 있도록 돕는 비공식 라이브러리.",
6
6
  "main": "lib/index.js",
7
7
  "type": "commonjs",