buzzk 2.1.5 → 2.1.7
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 +0 -4
- package/lib/live.js +1 -1
- package/package.json +1 -1
package/lib/chat.js
CHANGED
|
@@ -90,7 +90,6 @@ class chzzkChat {
|
|
|
90
90
|
|
|
91
91
|
this.#ws.on("SYSTEM", async (data) => {
|
|
92
92
|
data = JSON.parse(data);
|
|
93
|
-
console.log(data);
|
|
94
93
|
|
|
95
94
|
if (data.type == "connected") {
|
|
96
95
|
this.#session = data.data.sessionKey;
|
|
@@ -107,7 +106,6 @@ class chzzkChat {
|
|
|
107
106
|
this.#ws.on("CHAT", (data) => {
|
|
108
107
|
if (!this.#callbacks.message) return;
|
|
109
108
|
data = JSON.parse(data);
|
|
110
|
-
console.log(data);
|
|
111
109
|
|
|
112
110
|
let hasMod = false;
|
|
113
111
|
if (data.profile || data.profile.badges) {
|
|
@@ -124,7 +122,6 @@ class chzzkChat {
|
|
|
124
122
|
this.#ws.on("DONATION", (data) => {
|
|
125
123
|
if (!this.#callbacks.donation) return;
|
|
126
124
|
data = JSON.parse(data);
|
|
127
|
-
console.log(data);
|
|
128
125
|
|
|
129
126
|
let donationData = new chzzkDonationData(data.donationType, data.payAmount, data.donatorChannelId, data.donatorNickname, data.donationText, data.emojis);
|
|
130
127
|
return this.#callbacks.donation(donationData);
|
|
@@ -162,7 +159,6 @@ class chzzkChat {
|
|
|
162
159
|
send(message) {
|
|
163
160
|
return new Promise(async (resolve, reject) => {
|
|
164
161
|
if (!this.#ws || !this.#status.ws || !this.#status.established) return resolve(false);
|
|
165
|
-
console.log(message);
|
|
166
162
|
|
|
167
163
|
let reqMessage = {
|
|
168
164
|
message: message
|
package/lib/live.js
CHANGED
|
@@ -89,7 +89,7 @@ async function getDetail (channelID) {
|
|
|
89
89
|
async function getStatus (channelID) {
|
|
90
90
|
return new Promise(async (resolve, reject) => {
|
|
91
91
|
|
|
92
|
-
let res = await reqChzzk("polling/
|
|
92
|
+
let res = await reqChzzk("polling/v3/channels/" + channelID + "/live-status?includePlayerRecommendContent=false");
|
|
93
93
|
if (res.code != 200 || !res.content) return resolve(null);
|
|
94
94
|
res = res.content;
|
|
95
95
|
|