lavalink-client 1.2.1 → 1.2.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.
|
@@ -712,10 +712,10 @@ class LavalinkNode {
|
|
|
712
712
|
if (segments.some(v => !exports.validSponsorBlocks.includes(v.toLowerCase())))
|
|
713
713
|
throw new SyntaxError(`You provided a sponsorblock which isn't valid, valid ones are: ${exports.validSponsorBlocks.map(v => `'${v}'`).join(", ")}`);
|
|
714
714
|
// do the request
|
|
715
|
-
await this.request(`/sessions/${this.sessionId}/players/${player.guildId}/sponsorblock/categories`, (
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
715
|
+
await this.request(`/sessions/${this.sessionId}/players/${player.guildId}/sponsorblock/categories`, (r) => {
|
|
716
|
+
r.method = "PUT";
|
|
717
|
+
r.headers = { Authorization: this.options.authorization, 'Content-Type': 'application/json' };
|
|
718
|
+
r.body = JSON.stringify(segments.map(v => v.toLowerCase()));
|
|
719
719
|
});
|
|
720
720
|
return;
|
|
721
721
|
}
|
|
@@ -724,9 +724,8 @@ class LavalinkNode {
|
|
|
724
724
|
if (!this.info.plugins.find(v => v.name === "sponsorblock-plugin"))
|
|
725
725
|
throw new RangeError(`there is no sponsorblock-plugin available in the lavalink node: ${this.id}`);
|
|
726
726
|
// do the request
|
|
727
|
-
await this.request(`/sessions/${this.sessionId}/players/${player.guildId}/sponsorblock/categories`, (
|
|
728
|
-
|
|
729
|
-
return request;
|
|
727
|
+
await this.request(`/sessions/${this.sessionId}/players/${player.guildId}/sponsorblock/categories`, (r) => {
|
|
728
|
+
r.method = "DELETE";
|
|
730
729
|
});
|
|
731
730
|
return;
|
|
732
731
|
}
|
|
@@ -708,10 +708,10 @@ export class LavalinkNode {
|
|
|
708
708
|
if (segments.some(v => !validSponsorBlocks.includes(v.toLowerCase())))
|
|
709
709
|
throw new SyntaxError(`You provided a sponsorblock which isn't valid, valid ones are: ${validSponsorBlocks.map(v => `'${v}'`).join(", ")}`);
|
|
710
710
|
// do the request
|
|
711
|
-
await this.request(`/sessions/${this.sessionId}/players/${player.guildId}/sponsorblock/categories`, (
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
711
|
+
await this.request(`/sessions/${this.sessionId}/players/${player.guildId}/sponsorblock/categories`, (r) => {
|
|
712
|
+
r.method = "PUT";
|
|
713
|
+
r.headers = { Authorization: this.options.authorization, 'Content-Type': 'application/json' };
|
|
714
|
+
r.body = JSON.stringify(segments.map(v => v.toLowerCase()));
|
|
715
715
|
});
|
|
716
716
|
return;
|
|
717
717
|
}
|
|
@@ -720,9 +720,8 @@ export class LavalinkNode {
|
|
|
720
720
|
if (!this.info.plugins.find(v => v.name === "sponsorblock-plugin"))
|
|
721
721
|
throw new RangeError(`there is no sponsorblock-plugin available in the lavalink node: ${this.id}`);
|
|
722
722
|
// do the request
|
|
723
|
-
await this.request(`/sessions/${this.sessionId}/players/${player.guildId}/sponsorblock/categories`, (
|
|
724
|
-
|
|
725
|
-
return request;
|
|
723
|
+
await this.request(`/sessions/${this.sessionId}/players/${player.guildId}/sponsorblock/categories`, (r) => {
|
|
724
|
+
r.method = "DELETE";
|
|
726
725
|
});
|
|
727
726
|
return;
|
|
728
727
|
}
|
package/package.json
CHANGED