buzzk 2.1.2 → 2.1.3

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 -12
  2. package/package.json +1 -1
package/lib/chat.js CHANGED
@@ -18,13 +18,12 @@ class chzzkChatData {
18
18
  }
19
19
 
20
20
  class chzzkDonationData {
21
- constructor(type, amount, id, name, hasMod, message, emojis) {
21
+ constructor(type, amount, id, name, message, emojis) {
22
22
  this.type = type;
23
23
  this.amount = amount;
24
24
  this.author = {
25
25
  id: id,
26
- name: name,
27
- hasMod: hasMod
26
+ name: name
28
27
  };
29
28
  this.message = message;
30
29
  this.emojis = emojis;
@@ -126,15 +125,7 @@ class chzzkChat {
126
125
  data = JSON.parse(data);
127
126
  console.log(data);
128
127
 
129
- let hasMod = false;
130
- if (data.profile || data.profile.badges) {
131
- for (let o in data.profile.badges) {
132
- if (data.profile.badges[o].imageUrl == "https://ssl.pstatic.net/static/nng/glive/icon/streamer.png") hasMod = true;
133
- if (data.profile.badges[o].imageUrl == "https://ssl.pstatic.net/static/nng/glive/icon/manager.png") hasMod = true;
134
- }
135
- }
136
-
137
- let donationData = new chzzkDonationData(data.donationType, data.payAmount, data.donatorChannelId, data.donatorNickname, hasMod, data.donationText, data.emojis);
128
+ let donationData = new chzzkDonationData(data.donationType, data.payAmount, data.donatorChannelId, data.donatorNickname, data.donationText, data.emojis);
138
129
  return this.#callbacks.donation(donationData);
139
130
  });
140
131
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzk",
3
3
  "displayName": "BUZZK",
4
- "version": "2.1.2",
4
+ "version": "2.1.3",
5
5
  "description": "뿌지직 (BUZZK) - 치지직(CHZZK) 챗봇을 더욱 쉽게 개발할 수 있도록 돕는 비공식 라이브러리.",
6
6
  "main": "lib/index.js",
7
7
  "type": "commonjs",