buzzk 2.1.1 → 2.1.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/lib/chat.js +10 -6
- package/package.json +1 -1
package/lib/chat.js
CHANGED
|
@@ -110,9 +110,11 @@ class chzzkChat {
|
|
|
110
110
|
console.log(data);
|
|
111
111
|
|
|
112
112
|
let hasMod = false;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
if (data.profile || data.profile.badges) {
|
|
114
|
+
for (let o in data.profile.badges) {
|
|
115
|
+
if (data.profile.badges[o].imageUrl == "https://ssl.pstatic.net/static/nng/glive/icon/streamer.png") hasMod = true;
|
|
116
|
+
if (data.profile.badges[o].imageUrl == "https://ssl.pstatic.net/static/nng/glive/icon/manager.png") hasMod = true;
|
|
117
|
+
}
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
let chatData = new chzzkChatData(data.senderChannelId, data.profile.nickname, hasMod, data.content, data.emojis, data.messageTime);
|
|
@@ -125,9 +127,11 @@ class chzzkChat {
|
|
|
125
127
|
console.log(data);
|
|
126
128
|
|
|
127
129
|
let hasMod = false;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
+
}
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
let donationData = new chzzkDonationData(data.donationType, data.payAmount, data.donatorChannelId, data.donatorNickname, hasMod, data.donationText, data.emojis);
|