magmastream 2.10.2-dev.0 → 2.10.2-dev.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/dist/structures/Manager.d.ts +3 -2
- package/dist/structures/Manager.js +2 -17
- package/dist/structures/Node.js +2 -2
- package/dist/structures/Rest.js +18 -19
- package/dist/structures/Types.d.ts +36 -2
- package/dist/structures/Utils.js +29 -19
- package/dist/utils/managerCheck.d.ts +1 -1
- package/dist/utils/managerCheck.js +32 -2
- package/dist/wrappers/cloudstorm.d.ts +1 -1
- package/dist/wrappers/cloudstorm.js +15 -4
- package/dist/wrappers/discord.js.d.ts +1 -2
- package/dist/wrappers/discord.js.js +9 -15
- package/dist/wrappers/discordeno.d.ts +1 -2
- package/dist/wrappers/discordeno.js +5 -6
- package/dist/wrappers/eris.d.ts +0 -1
- package/dist/wrappers/eris.js +1 -3
- package/dist/wrappers/oceanic.d.ts +1 -2
- package/dist/wrappers/oceanic.js +3 -6
- package/dist/wrappers/seyfert.d.ts +1 -2
- package/dist/wrappers/seyfert.js +9 -10
- package/package.json +107 -110
|
@@ -4,7 +4,7 @@ import { EventEmitter } from "events";
|
|
|
4
4
|
import { Node } from "./Node";
|
|
5
5
|
import { Player } from "./Player";
|
|
6
6
|
import { Redis as RedisClient } from "ioredis";
|
|
7
|
-
import { AnyGuild, AnyUser, DiscordVoiceState, ManagerEvents, ManagerInitOptions, ManagerOptions, NodeOptions, PlayerOptions, SearchQuery, SearchResult, TrackData, VoicePacket, VoiceServer } from "./Types";
|
|
7
|
+
import { AnyGuild, AnyUser, DiscordVoiceState, ManagerEvents, ManagerInitOptions, ManagerOptions, NodeOptions, PlayerOptions, SearchQuery, SearchResult, StandaloneManagerOptions, TrackData, VoicePacket, VoiceServer } from "./Types";
|
|
8
8
|
/**
|
|
9
9
|
* The main hub for interacting with Lavalink and using Magmastream.
|
|
10
10
|
*/
|
|
@@ -36,7 +36,8 @@ export declare class Manager extends EventEmitter {
|
|
|
36
36
|
* @param options.eventBatchDuration - The duration to wait before processing the collected player state events.
|
|
37
37
|
* @param options.eventBatchInterval - The interval to wait before processing the collected player state events.
|
|
38
38
|
*/
|
|
39
|
-
constructor(options:
|
|
39
|
+
constructor(options: StandaloneManagerOptions);
|
|
40
|
+
constructor(options: ManagerOptions, isWrapper: true);
|
|
40
41
|
/**
|
|
41
42
|
* Initiates the Manager.
|
|
42
43
|
* @param clientId - The Discord client ID (only required when not using any of the magmastream wrappers).
|
|
@@ -32,24 +32,9 @@ class Manager extends events_1.EventEmitter {
|
|
|
32
32
|
_getUser;
|
|
33
33
|
_getGuild;
|
|
34
34
|
loadedPlugins = new Set();
|
|
35
|
-
|
|
36
|
-
* Initiates the Manager class.
|
|
37
|
-
* @param options
|
|
38
|
-
* @param options.enabledPlugins - An array of enabledPlugins to load.
|
|
39
|
-
* @param options.nodes - An array of node options to create nodes from.
|
|
40
|
-
* @param options.playNextOnEnd - Whether to automatically play the first track in the queue when the player is created.
|
|
41
|
-
* @param options.autoPlaySearchPlatforms - The search platform autoplay will use. Fallback to Youtube if not found.
|
|
42
|
-
* @param options.enablePriorityMode - Whether to use the priority when selecting a node to play on.
|
|
43
|
-
* @param options.clientName - The name of the client to send to Lavalink.
|
|
44
|
-
* @param options.defaultSearchPlatform - The default search platform to use when searching for tracks.
|
|
45
|
-
* @param options.useNode - The strategy to use when selecting a node to play on.
|
|
46
|
-
* @param options.trackPartial - The partial track search results to use when searching for tracks. This partials will always be presented on each track.
|
|
47
|
-
* @param options.eventBatchDuration - The duration to wait before processing the collected player state events.
|
|
48
|
-
* @param options.eventBatchInterval - The interval to wait before processing the collected player state events.
|
|
49
|
-
*/
|
|
50
|
-
constructor(options) {
|
|
35
|
+
constructor(options, isWrapper = false) {
|
|
51
36
|
super();
|
|
52
|
-
(0, managerCheck_1.default)(options);
|
|
37
|
+
(0, managerCheck_1.default)(options, isWrapper);
|
|
53
38
|
// Initialize structures
|
|
54
39
|
Utils_1.Structure.get("Player").init(this);
|
|
55
40
|
Utils_1.TrackUtils.init(this);
|
package/dist/structures/Node.js
CHANGED
|
@@ -759,7 +759,7 @@ class Node {
|
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
if (playNextOnEnd)
|
|
762
|
-
await player.play(
|
|
762
|
+
await player.play();
|
|
763
763
|
}
|
|
764
764
|
/**
|
|
765
765
|
* Plays the next track in the queue.
|
|
@@ -777,7 +777,7 @@ class Node {
|
|
|
777
777
|
await player.queue.setCurrent(await player.queue.dequeue());
|
|
778
778
|
this.manager.emit(Enums_1.ManagerEventTypes.TrackEnd, player, track, payload);
|
|
779
779
|
if (this.manager.options.playNextOnEnd)
|
|
780
|
-
await player.play(
|
|
780
|
+
await player.play();
|
|
781
781
|
}
|
|
782
782
|
/**
|
|
783
783
|
* Handles the event when a queue ends.
|
package/dist/structures/Rest.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Rest = void 0;
|
|
4
|
-
const
|
|
5
|
-
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
4
|
+
const undici_1 = require("undici");
|
|
6
5
|
const Enums_1 = require("./Enums");
|
|
7
6
|
const Utils_1 = require("./Utils");
|
|
8
7
|
const MagmastreamError_1 = require("./MagmastreamError");
|
|
@@ -105,43 +104,43 @@ class Rest {
|
|
|
105
104
|
*/
|
|
106
105
|
async request(method, endpoint, body) {
|
|
107
106
|
this.manager.emit(Enums_1.ManagerEventTypes.Debug, `[REST] ${method} request to ${endpoint} with body: ${Utils_1.JSONUtils.safe(body, 2)}`);
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
url: this.url + endpoint,
|
|
111
|
-
headers: {
|
|
112
|
-
"Content-Type": "application/json",
|
|
113
|
-
Authorization: this.password,
|
|
114
|
-
},
|
|
115
|
-
data: body,
|
|
116
|
-
timeout: this.node.options.apiRequestTimeoutMs,
|
|
117
|
-
validateStatus: () => true,
|
|
118
|
-
};
|
|
107
|
+
const controller = new AbortController();
|
|
108
|
+
const timeoutHandle = setTimeout(() => controller.abort(), this.node.options.apiRequestTimeoutMs);
|
|
119
109
|
let response = null;
|
|
120
110
|
try {
|
|
121
|
-
response = await (0,
|
|
111
|
+
response = await (0, undici_1.fetch)(this.url + endpoint, {
|
|
112
|
+
method,
|
|
113
|
+
headers: {
|
|
114
|
+
"Content-Type": "application/json",
|
|
115
|
+
Authorization: this.password,
|
|
116
|
+
},
|
|
117
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
118
|
+
signal: controller.signal,
|
|
119
|
+
});
|
|
122
120
|
}
|
|
123
121
|
catch (e) {
|
|
124
|
-
const isTimeout =
|
|
122
|
+
const isTimeout = e instanceof Error && e.name === "AbortError";
|
|
125
123
|
const message = e instanceof Error ? e.message : "Unknown error";
|
|
126
124
|
const error = new MagmastreamError_1.MagmaStreamError({
|
|
127
125
|
code: Enums_1.MagmaStreamErrorCode.REST_REQUEST_FAILED,
|
|
128
126
|
message: `${isTimeout ? "Timeout" : "Network error"} on ${method} ${endpoint}: ${message}`,
|
|
129
127
|
});
|
|
130
|
-
// Emit so the node manager can react (e.g. trigger reconnection logic)
|
|
131
128
|
this.manager.emit(Enums_1.ManagerEventTypes.NodeError, this.node, error);
|
|
132
129
|
return null;
|
|
133
130
|
}
|
|
134
|
-
|
|
131
|
+
finally {
|
|
132
|
+
clearTimeout(timeoutHandle);
|
|
133
|
+
}
|
|
134
|
+
const { status } = response;
|
|
135
|
+
const data = status !== 204 ? await response.json() : null;
|
|
135
136
|
if (status >= 200 && status < 300) {
|
|
136
137
|
return data;
|
|
137
138
|
}
|
|
138
139
|
if (status === 404) {
|
|
139
140
|
if (data?.message === "Guild not found") {
|
|
140
|
-
// Lavalink sometimes returns "Guild not found" for inactive players
|
|
141
141
|
return [];
|
|
142
142
|
}
|
|
143
143
|
if (data?.message === "Session not found") {
|
|
144
|
-
// Session expired — trigger reconnection instead of crashing
|
|
145
144
|
this.manager.emit(Enums_1.ManagerEventTypes.NodeError, this.node, new MagmastreamError_1.MagmaStreamError({ code: Enums_1.MagmaStreamErrorCode.REST_REQUEST_FAILED, message: "Session not found" }));
|
|
146
145
|
return [];
|
|
147
146
|
}
|
|
@@ -84,7 +84,7 @@ export interface ManagerOptions {
|
|
|
84
84
|
*/
|
|
85
85
|
send?: (packet: DiscordPacket) => unknown;
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
87
|
+
* User cache getter. Required when using `new Manager(...)` directly, optional for built-in wrappers.
|
|
88
88
|
* When resolving a user from a partial ID, this function will be called first.
|
|
89
89
|
* Should return the full user object if cached, or undefined if not.
|
|
90
90
|
* @param id The ID of the user to get.
|
|
@@ -92,7 +92,7 @@ export interface ManagerOptions {
|
|
|
92
92
|
*/
|
|
93
93
|
getUser?: (id: string) => AnyUser | undefined;
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Guild cache getter. Required when using `new Manager(...)` directly, optional for built-in wrappers.
|
|
96
96
|
* When resolving a guild from a partial ID, this function will be called first.
|
|
97
97
|
* Should return the full guild object if cached, or undefined if not.
|
|
98
98
|
* @param id The ID of the guild to get.
|
|
@@ -100,6 +100,14 @@ export interface ManagerOptions {
|
|
|
100
100
|
*/
|
|
101
101
|
getGuild?: (id: string) => AnyGuild | undefined;
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Manager options for direct `new Manager(...)` usage.
|
|
105
|
+
* Built-in wrappers provide these cache hooks automatically, so they only require {@link ManagerOptions}.
|
|
106
|
+
*/
|
|
107
|
+
export interface StandaloneManagerOptions extends ManagerOptions {
|
|
108
|
+
getUser: (id: string) => AnyUser | undefined;
|
|
109
|
+
getGuild: (id: string) => AnyGuild | undefined;
|
|
110
|
+
}
|
|
103
111
|
/**
|
|
104
112
|
* State Storage Options
|
|
105
113
|
*/
|
|
@@ -1229,6 +1237,32 @@ export interface ReverbOptions {
|
|
|
1229
1237
|
roomSize?: number;
|
|
1230
1238
|
damping?: number;
|
|
1231
1239
|
}
|
|
1240
|
+
export interface LastFmResponse {
|
|
1241
|
+
error?: number;
|
|
1242
|
+
toptracks?: {
|
|
1243
|
+
track: Array<{
|
|
1244
|
+
name: string;
|
|
1245
|
+
artist: {
|
|
1246
|
+
name: string;
|
|
1247
|
+
};
|
|
1248
|
+
}>;
|
|
1249
|
+
};
|
|
1250
|
+
similartracks?: {
|
|
1251
|
+
track: Array<{
|
|
1252
|
+
name: string;
|
|
1253
|
+
artist: {
|
|
1254
|
+
name: string;
|
|
1255
|
+
};
|
|
1256
|
+
}>;
|
|
1257
|
+
};
|
|
1258
|
+
results?: {
|
|
1259
|
+
trackmatches?: {
|
|
1260
|
+
track: Array<{
|
|
1261
|
+
artist: string;
|
|
1262
|
+
}>;
|
|
1263
|
+
};
|
|
1264
|
+
};
|
|
1265
|
+
}
|
|
1232
1266
|
/**
|
|
1233
1267
|
* Queue interface
|
|
1234
1268
|
*/
|
package/dist/structures/Utils.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.JSONUtils = exports.Structure = exports.PlayerUtils = exports.AutoPlayUtils = exports.TrackUtils = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
6
|
-
const
|
|
6
|
+
const undici_1 = require("undici");
|
|
7
7
|
const jsdom_1 = require("jsdom");
|
|
8
8
|
const Enums_1 = require("./Enums");
|
|
9
9
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -250,11 +250,12 @@ class AutoPlayUtils {
|
|
|
250
250
|
if (!title) {
|
|
251
251
|
// No title provided, search for the artist's top tracks
|
|
252
252
|
const noTitleUrl = `https://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&artist=${artist}&autocorrect=1&api_key=${apiKey}&format=json`;
|
|
253
|
-
const response = await (0,
|
|
254
|
-
|
|
253
|
+
const response = await (0, undici_1.fetch)(noTitleUrl);
|
|
254
|
+
const data = (await response.json());
|
|
255
|
+
if (data.error || !data.toptracks?.track?.length) {
|
|
255
256
|
return [];
|
|
256
257
|
}
|
|
257
|
-
const randomTrack =
|
|
258
|
+
const randomTrack = data.toptracks.track[Math.floor(Math.random() * data.toptracks.track.length)];
|
|
258
259
|
const resolvedTracks = await this.resolveTracksFromQuery(`${randomTrack.artist.name} - ${randomTrack.name}`, this.manager.options.defaultSearchPlatform, track.requester);
|
|
259
260
|
if (!resolvedTracks.length)
|
|
260
261
|
return [];
|
|
@@ -263,8 +264,9 @@ class AutoPlayUtils {
|
|
|
263
264
|
if (!artist) {
|
|
264
265
|
// No artist provided, search for the track title
|
|
265
266
|
const noArtistUrl = `https://ws.audioscrobbler.com/2.0/?method=track.search&track=${title}&api_key=${apiKey}&format=json`;
|
|
266
|
-
const response = await (0,
|
|
267
|
-
|
|
267
|
+
const response = await (0, undici_1.fetch)(noArtistUrl);
|
|
268
|
+
const noArtistData = (await response.json());
|
|
269
|
+
artist = noArtistData.results?.trackmatches?.track?.[0]?.artist;
|
|
268
270
|
if (!artist) {
|
|
269
271
|
return [];
|
|
270
272
|
}
|
|
@@ -272,22 +274,24 @@ class AutoPlayUtils {
|
|
|
272
274
|
}
|
|
273
275
|
// Search for similar tracks to the current track
|
|
274
276
|
const url = `https://ws.audioscrobbler.com/2.0/?method=track.getSimilar&artist=${artist}&track=${title}&limit=10&autocorrect=1&api_key=${apiKey}&format=json`;
|
|
275
|
-
let
|
|
277
|
+
let similarData;
|
|
276
278
|
try {
|
|
277
|
-
response = await (0,
|
|
279
|
+
const response = await (0, undici_1.fetch)(url);
|
|
280
|
+
similarData = (await response.json());
|
|
278
281
|
}
|
|
279
282
|
catch (error) {
|
|
280
283
|
console.error("[AutoPlay] Error fetching similar tracks from Last.fm:", error);
|
|
281
284
|
return [];
|
|
282
285
|
}
|
|
283
|
-
if (
|
|
286
|
+
if (similarData.error || !similarData.similartracks?.track?.length) {
|
|
284
287
|
// Retry the request if the first attempt fails
|
|
285
288
|
const retryUrl = `https://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&artist=${artist}&autocorrect=1&api_key=${apiKey}&format=json`;
|
|
286
|
-
const retryResponse = await (0,
|
|
287
|
-
|
|
289
|
+
const retryResponse = await (0, undici_1.fetch)(retryUrl);
|
|
290
|
+
const retryData = (await retryResponse.json());
|
|
291
|
+
if (retryData.error || !retryData.toptracks?.track?.length) {
|
|
288
292
|
return [];
|
|
289
293
|
}
|
|
290
|
-
const randomTrack =
|
|
294
|
+
const randomTrack = retryData.toptracks.track[Math.floor(Math.random() * retryData.toptracks.track.length)];
|
|
291
295
|
const resolvedTracks = await this.resolveTracksFromQuery(`${randomTrack.artist.name} - ${randomTrack.name}`, this.manager.options.defaultSearchPlatform, track.requester);
|
|
292
296
|
if (!resolvedTracks.length)
|
|
293
297
|
return [];
|
|
@@ -297,7 +301,7 @@ class AutoPlayUtils {
|
|
|
297
301
|
}
|
|
298
302
|
return filteredTracks;
|
|
299
303
|
}
|
|
300
|
-
const randomTrack =
|
|
304
|
+
const randomTrack = similarData.similartracks.track.sort(() => Math.random() - 0.5).shift();
|
|
301
305
|
if (!randomTrack) {
|
|
302
306
|
return [];
|
|
303
307
|
}
|
|
@@ -356,15 +360,21 @@ class AutoPlayUtils {
|
|
|
356
360
|
return [];
|
|
357
361
|
track = resolvedTrack;
|
|
358
362
|
}
|
|
363
|
+
let html;
|
|
359
364
|
try {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
+
let recommendedRes = null;
|
|
366
|
+
try {
|
|
367
|
+
recommendedRes = await (0, undici_1.fetch)(`${track.uri}/recommended`);
|
|
368
|
+
}
|
|
369
|
+
catch (err) {
|
|
370
|
+
console.error(`[AutoPlay] Failed to fetch SoundCloud recommendations.`, err);
|
|
371
|
+
return [];
|
|
372
|
+
}
|
|
373
|
+
if (!recommendedRes.ok) {
|
|
374
|
+
console.error(`[AutoPlay] Failed to fetch SoundCloud recommendations. Status: ${recommendedRes.status}`);
|
|
365
375
|
return [];
|
|
366
376
|
}
|
|
367
|
-
|
|
377
|
+
html = await recommendedRes.text();
|
|
368
378
|
const dom = new jsdom_1.JSDOM(html);
|
|
369
379
|
const window = dom.window;
|
|
370
380
|
// Narrow the element types using instanceof
|
|
@@ -4,4 +4,4 @@ import { ManagerOptions } from "../structures/Types";
|
|
|
4
4
|
* @param options - The options to validate.
|
|
5
5
|
* @throws {MagmaStreamError} Throws if any required option is missing or invalid.
|
|
6
6
|
*/
|
|
7
|
-
export default function managerCheck(options: ManagerOptions): void;
|
|
7
|
+
export default function managerCheck(options: ManagerOptions, isWrapper?: boolean): void;
|
|
@@ -8,7 +8,7 @@ const MagmastreamError_1 = require("../structures/MagmastreamError");
|
|
|
8
8
|
* @param options - The options to validate.
|
|
9
9
|
* @throws {MagmaStreamError} Throws if any required option is missing or invalid.
|
|
10
10
|
*/
|
|
11
|
-
function managerCheck(options) {
|
|
11
|
+
function managerCheck(options, isWrapper = false) {
|
|
12
12
|
if (!options) {
|
|
13
13
|
throw new MagmastreamError_1.MagmaStreamError({
|
|
14
14
|
code: Enums_1.MagmaStreamErrorCode.MANAGER_INVALID_CONFIG,
|
|
@@ -16,7 +16,7 @@ function managerCheck(options) {
|
|
|
16
16
|
context: { option: "options" },
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
const { playNextOnEnd, clientName, defaultSearchPlatform, autoPlaySearchPlatforms, nodes, enabledPlugins, send, trackPartial, enablePriorityMode, useNode, normalizeYouTubeTitles, lastFmApiKey, maxPreviousTracks, } = options;
|
|
19
|
+
const { playNextOnEnd, clientName, defaultSearchPlatform, autoPlaySearchPlatforms, nodes, enabledPlugins, send, trackPartial, enablePriorityMode, useNode, normalizeYouTubeTitles, lastFmApiKey, maxPreviousTracks, getUser, getGuild, } = options;
|
|
20
20
|
// Validate playNextOnEnd option
|
|
21
21
|
if (typeof playNextOnEnd !== "boolean") {
|
|
22
22
|
throw new MagmastreamError_1.MagmaStreamError({
|
|
@@ -173,4 +173,34 @@ function managerCheck(options) {
|
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
+
if (!isWrapper) {
|
|
177
|
+
if (typeof getUser === "undefined") {
|
|
178
|
+
throw new MagmastreamError_1.MagmaStreamError({
|
|
179
|
+
code: Enums_1.MagmaStreamErrorCode.MANAGER_INVALID_CONFIG,
|
|
180
|
+
message: 'Manager option "getUser" is required when not using a built-in wrapper.',
|
|
181
|
+
context: { option: "getUser" },
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
if (typeof getGuild === "undefined") {
|
|
185
|
+
throw new MagmastreamError_1.MagmaStreamError({
|
|
186
|
+
code: Enums_1.MagmaStreamErrorCode.MANAGER_INVALID_CONFIG,
|
|
187
|
+
message: 'Manager option "getGuild" is required when not using a built-in wrapper.',
|
|
188
|
+
context: { option: "getGuild" },
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (typeof getUser !== "undefined" && typeof getUser !== "function") {
|
|
193
|
+
throw new MagmastreamError_1.MagmaStreamError({
|
|
194
|
+
code: Enums_1.MagmaStreamErrorCode.MANAGER_INVALID_CONFIG,
|
|
195
|
+
message: 'Manager option "getUser" must be a function.',
|
|
196
|
+
context: { option: "getUser", value: getUser },
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
if (typeof getGuild !== "undefined" && typeof getGuild !== "function") {
|
|
200
|
+
throw new MagmastreamError_1.MagmaStreamError({
|
|
201
|
+
code: Enums_1.MagmaStreamErrorCode.MANAGER_INVALID_CONFIG,
|
|
202
|
+
message: 'Manager option "getGuild" must be a function.',
|
|
203
|
+
context: { option: "getGuild", value: getGuild },
|
|
204
|
+
});
|
|
205
|
+
}
|
|
176
206
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GatewayVoiceStateUpdate } from "discord-api-types/v10";
|
|
2
2
|
import { Manager as BaseManager } from "../structures/Manager";
|
|
3
|
-
import { Client } from "cloudstorm";
|
|
3
|
+
import type { Client } from "cloudstorm";
|
|
4
4
|
import { AnyGuild, AnyUser, ManagerOptions, PortableUser } from "../structures/Types";
|
|
5
5
|
/**
|
|
6
6
|
* Cloudstorm wrapper for Magmastream.
|
|
@@ -2,9 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CloudstormManager = void 0;
|
|
4
4
|
const Manager_1 = require("../structures/Manager");
|
|
5
|
-
const cloudstorm_1 = require("cloudstorm");
|
|
6
5
|
const Enums_1 = require("../structures/Enums");
|
|
7
6
|
const MagmastreamError_1 = require("../structures/MagmastreamError");
|
|
7
|
+
const GUILD_VOICE_STATES_INTENT = 128;
|
|
8
|
+
function hasCloudstormGuildVoiceStates(intents) {
|
|
9
|
+
if (typeof intents === "number") {
|
|
10
|
+
return (intents & GUILD_VOICE_STATES_INTENT) === GUILD_VOICE_STATES_INTENT;
|
|
11
|
+
}
|
|
12
|
+
if (typeof intents === "string") {
|
|
13
|
+
return intents === "GUILD_VOICE_STATES";
|
|
14
|
+
}
|
|
15
|
+
if (Array.isArray(intents)) {
|
|
16
|
+
return intents.some((intent) => (typeof intent === "number" ? (intent & GUILD_VOICE_STATES_INTENT) === GUILD_VOICE_STATES_INTENT : intent === "GUILD_VOICE_STATES"));
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
8
20
|
/**
|
|
9
21
|
* Cloudstorm wrapper for Magmastream.
|
|
10
22
|
*
|
|
@@ -24,11 +36,10 @@ const MagmastreamError_1 = require("../structures/MagmastreamError");
|
|
|
24
36
|
class CloudstormManager extends Manager_1.Manager {
|
|
25
37
|
client;
|
|
26
38
|
constructor(client, options) {
|
|
27
|
-
super(options);
|
|
39
|
+
super(options, true);
|
|
28
40
|
this.client = client;
|
|
29
41
|
// Ensure GUILD_VOICE_STATES intent is enabled
|
|
30
|
-
|
|
31
|
-
if (!(resolvedIntents & cloudstorm_1.Intents.flags.GUILD_VOICE_STATES)) {
|
|
42
|
+
if (!hasCloudstormGuildVoiceStates(client.options.intents)) {
|
|
32
43
|
throw new MagmastreamError_1.MagmaStreamError({
|
|
33
44
|
code: Enums_1.MagmaStreamErrorCode.INTENT_MISSING,
|
|
34
45
|
message: "[CloudstormManager] Your Cloudstorm client must have the GUILD_VOICE_STATES intent enabled.",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Manager as BaseManager } from "../structures/Manager";
|
|
2
2
|
import type { GatewayVoiceStateUpdate } from "discord-api-types/v10";
|
|
3
|
-
import { Client, Guild, User } from "discord.js";
|
|
3
|
+
import type { Client, Guild, User } from "discord.js";
|
|
4
4
|
import { AnyUser, ManagerOptions } from "../structures/Types";
|
|
5
|
-
export * from "../index";
|
|
6
5
|
/**
|
|
7
6
|
* Discord.js wrapper for Magmastream.
|
|
8
7
|
*/
|
|
@@ -1,41 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DiscordJSManager = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const Manager_1 = require("../structures/Manager");
|
|
6
|
-
const discord_js_1 = require("discord.js");
|
|
7
|
-
const discord_js_2 = require("discord.js");
|
|
8
5
|
const MagmastreamError_1 = require("../structures/MagmastreamError");
|
|
9
6
|
const Enums_1 = require("../structures/Enums");
|
|
10
|
-
const
|
|
11
|
-
tslib_1.__exportStar(require("../index"), exports);
|
|
7
|
+
const GUILD_VOICE_STATES_INTENT = 128;
|
|
12
8
|
/**
|
|
13
9
|
* Discord.js wrapper for Magmastream.
|
|
14
10
|
*/
|
|
15
11
|
class DiscordJSManager extends Manager_1.Manager {
|
|
16
12
|
client;
|
|
17
13
|
constructor(client, options) {
|
|
18
|
-
super(options);
|
|
14
|
+
super(options, true);
|
|
19
15
|
this.client = client;
|
|
20
|
-
if (!this.client.options.intents.has(
|
|
16
|
+
if (!this.client.options.intents.has(GUILD_VOICE_STATES_INTENT)) {
|
|
21
17
|
throw new MagmastreamError_1.MagmaStreamError({
|
|
22
18
|
code: Enums_1.MagmaStreamErrorCode.INTENT_MISSING,
|
|
23
19
|
message: "[Custom Wrapper] Your Discord.js client must have the GuildVoiceStates intent enabled.",
|
|
24
20
|
});
|
|
25
21
|
}
|
|
26
22
|
const attachReadyHandler = () => {
|
|
23
|
+
let handled = false;
|
|
27
24
|
const handler = () => {
|
|
25
|
+
if (handled)
|
|
26
|
+
return;
|
|
27
|
+
handled = true;
|
|
28
28
|
if (!this.options.clientId)
|
|
29
29
|
this.options.clientId = this.client.user.id;
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this.client.once("clientReady", handler);
|
|
34
|
-
}
|
|
35
|
-
// Only attach ready if Discord.js < 14.22.0
|
|
36
|
-
if (major < 14 || (major === 14 && minor < 22)) {
|
|
37
|
-
this.client.once("ready", handler);
|
|
38
|
-
}
|
|
31
|
+
this.client.once("clientReady", handler);
|
|
32
|
+
this.client.once("ready", handler);
|
|
39
33
|
};
|
|
40
34
|
attachReadyHandler();
|
|
41
35
|
client.on("raw", async (data) => {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GatewayVoiceStateUpdate } from "discord-api-types/v10";
|
|
2
2
|
import { Manager as BaseManager } from "../structures/Manager";
|
|
3
|
-
import { Bot, User } from "@discordeno/bot";
|
|
3
|
+
import type { Bot, User } from "@discordeno/bot";
|
|
4
4
|
import { AnyGuild, AnyUser, ManagerOptions } from "../structures/Types";
|
|
5
|
-
export * from "../index";
|
|
6
5
|
/**
|
|
7
6
|
* Discordeno wrapper for Magmastream.
|
|
8
7
|
*/
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DiscordenoManager = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const Manager_1 = require("../structures/Manager");
|
|
6
|
-
const bot_1 = require("@discordeno/bot");
|
|
7
5
|
const Enums_1 = require("../structures/Enums");
|
|
8
6
|
const MagmastreamError_1 = require("../structures/MagmastreamError");
|
|
9
|
-
|
|
7
|
+
const GUILD_VOICE_STATES_INTENT = 128;
|
|
8
|
+
const VOICE_STATE_UPDATE_OPCODE = 4;
|
|
10
9
|
/**
|
|
11
10
|
* Discordeno wrapper for Magmastream.
|
|
12
11
|
*/
|
|
13
12
|
class DiscordenoManager extends Manager_1.Manager {
|
|
14
13
|
client;
|
|
15
14
|
constructor(client, options) {
|
|
16
|
-
super(options);
|
|
15
|
+
super(options, true);
|
|
17
16
|
this.client = client;
|
|
18
17
|
// Ensure GuildVoiceStates intent is enabled
|
|
19
18
|
const intents = this.client.gateway.intents;
|
|
20
|
-
if (!(intents &
|
|
19
|
+
if (!(intents & GUILD_VOICE_STATES_INTENT)) {
|
|
21
20
|
throw new MagmastreamError_1.MagmaStreamError({
|
|
22
21
|
code: Enums_1.MagmaStreamErrorCode.INTENT_MISSING,
|
|
23
22
|
message: "[Custom Wrapper] Your Discordeno client must have the GuildVoiceStates intent enabled.",
|
|
@@ -49,7 +48,7 @@ class DiscordenoManager extends Manager_1.Manager {
|
|
|
49
48
|
// Send voice state updates to the guild shard
|
|
50
49
|
send(packet) {
|
|
51
50
|
this.client.gateway.sendPayload(this.client.gateway.calculateShardId(packet.d.guild_id), {
|
|
52
|
-
op:
|
|
51
|
+
op: VOICE_STATE_UPDATE_OPCODE,
|
|
53
52
|
d: packet.d,
|
|
54
53
|
});
|
|
55
54
|
}
|
package/dist/wrappers/eris.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { GatewayVoiceStateUpdate } from "discord-api-types/v10";
|
|
|
2
2
|
import { Manager as BaseManager } from "../structures/Manager";
|
|
3
3
|
import type { Client, Guild, User } from "eris";
|
|
4
4
|
import { AnyUser, ManagerOptions } from "../structures/Types";
|
|
5
|
-
export * from "../index";
|
|
6
5
|
/**
|
|
7
6
|
* Eris wrapper for Magmastream.
|
|
8
7
|
*/
|
package/dist/wrappers/eris.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ErisManager = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const v10_1 = require("discord-api-types/v10");
|
|
6
5
|
const Manager_1 = require("../structures/Manager");
|
|
7
6
|
const Enums_1 = require("../structures/Enums");
|
|
8
7
|
const MagmastreamError_1 = require("../structures/MagmastreamError");
|
|
9
|
-
tslib_1.__exportStar(require("../index"), exports);
|
|
10
8
|
/**
|
|
11
9
|
* Eris wrapper for Magmastream.
|
|
12
10
|
*/
|
|
13
11
|
class ErisManager extends Manager_1.Manager {
|
|
14
12
|
client;
|
|
15
13
|
constructor(client, options) {
|
|
16
|
-
super(options);
|
|
14
|
+
super(options, true);
|
|
17
15
|
this.client = client;
|
|
18
16
|
const intents = this.client.options.intents;
|
|
19
17
|
const hasGuildVoiceStates = typeof intents === "number" ? (intents & v10_1.GatewayIntentBits.GuildVoiceStates) === v10_1.GatewayIntentBits.GuildVoiceStates : intents.includes("guildVoiceStates");
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GatewayVoiceStateUpdate } from "discord-api-types/v10";
|
|
2
2
|
import { Manager as BaseManager } from "../structures/Manager";
|
|
3
3
|
import { AnyUser, ManagerOptions } from "../structures/Types";
|
|
4
|
-
import { Client, Guild, User } from "oceanic.js";
|
|
5
|
-
export * from "../index";
|
|
4
|
+
import type { Client, Guild, User } from "oceanic.js";
|
|
6
5
|
/**
|
|
7
6
|
* Oceanic wrapper for Magmastream.
|
|
8
7
|
*/
|
package/dist/wrappers/oceanic.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OceanicManager = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const Manager_1 = require("../structures/Manager");
|
|
6
|
-
const oceanic_js_1 = require("oceanic.js");
|
|
7
5
|
const Enums_1 = require("../structures/Enums");
|
|
8
6
|
const MagmastreamError_1 = require("../structures/MagmastreamError");
|
|
9
|
-
|
|
7
|
+
const GUILD_VOICE_STATES_INTENT = 128;
|
|
10
8
|
/**
|
|
11
9
|
* Oceanic wrapper for Magmastream.
|
|
12
10
|
*/
|
|
13
11
|
class OceanicManager extends Manager_1.Manager {
|
|
14
12
|
client;
|
|
15
13
|
constructor(client, options) {
|
|
16
|
-
super(options);
|
|
14
|
+
super(options, true);
|
|
17
15
|
this.client = client;
|
|
18
16
|
const intents = this.client.shards.options.intents;
|
|
19
|
-
const
|
|
20
|
-
const hasGuildVoiceStates = typeof intents === "number" ? (intents & Intents.GUILD_VOICE_STATES) === Intents.GUILD_VOICE_STATES : intents.includes("GUILD_VOICE_STATES");
|
|
17
|
+
const hasGuildVoiceStates = typeof intents === "number" ? (intents & GUILD_VOICE_STATES_INTENT) === GUILD_VOICE_STATES_INTENT : intents.includes("GUILD_VOICE_STATES");
|
|
21
18
|
if (!hasGuildVoiceStates) {
|
|
22
19
|
throw new MagmastreamError_1.MagmaStreamError({
|
|
23
20
|
code: Enums_1.MagmaStreamErrorCode.INTENT_MISSING,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Manager as BaseManager } from "../structures/Manager";
|
|
2
2
|
import { type GatewayVoiceStateUpdate } from "discord-api-types/v10";
|
|
3
|
-
import { Client, Guild, User, WorkerClient } from "seyfert";
|
|
3
|
+
import type { Client, Guild, User, WorkerClient } from "seyfert";
|
|
4
4
|
import { AnyUser, ManagerOptions } from "../structures/Types";
|
|
5
|
-
export * from "../index";
|
|
6
5
|
/**
|
|
7
6
|
* Seyfert wrapper for Magmastream.
|
|
8
7
|
*
|
package/dist/wrappers/seyfert.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SeyfertManager = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const Manager_1 = require("../structures/Manager");
|
|
6
|
-
const seyfert_1 = require("seyfert");
|
|
7
|
-
const types_1 = require("seyfert/lib/types");
|
|
8
|
-
const common_1 = require("seyfert/lib/common");
|
|
9
5
|
const MagmastreamError_1 = require("../structures/MagmastreamError");
|
|
10
6
|
const Enums_1 = require("../structures/Enums");
|
|
11
|
-
|
|
7
|
+
const GUILD_VOICE_STATES_INTENT = 128;
|
|
8
|
+
function calculateShardId(guildId, totalShards) {
|
|
9
|
+
return Number((BigInt(guildId) >> BigInt(22)) % BigInt(totalShards));
|
|
10
|
+
}
|
|
12
11
|
/**
|
|
13
12
|
* Seyfert wrapper for Magmastream.
|
|
14
13
|
*
|
|
@@ -37,12 +36,12 @@ tslib_1.__exportStar(require("../index"), exports);
|
|
|
37
36
|
class SeyfertManager extends Manager_1.Manager {
|
|
38
37
|
client;
|
|
39
38
|
constructor(client, options) {
|
|
40
|
-
super(options);
|
|
39
|
+
super(options, true);
|
|
41
40
|
this.client = client;
|
|
42
41
|
this.client
|
|
43
42
|
.getRC()
|
|
44
43
|
.then((rc) => {
|
|
45
|
-
if (!(rc.intents &
|
|
44
|
+
if (!(rc.intents & GUILD_VOICE_STATES_INTENT)) {
|
|
46
45
|
throw new MagmastreamError_1.MagmaStreamError({
|
|
47
46
|
code: Enums_1.MagmaStreamErrorCode.INTENT_MISSING,
|
|
48
47
|
message: "[Custom Wrapper] Your Seyfert client must have the GuildVoiceStates intent enabled.",
|
|
@@ -56,11 +55,11 @@ class SeyfertManager extends Manager_1.Manager {
|
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
57
|
send(packet) {
|
|
59
|
-
if (this.client
|
|
60
|
-
this.client.gateway.send(
|
|
58
|
+
if ("gateway" in this.client) {
|
|
59
|
+
this.client.gateway.send(calculateShardId(packet.d.guild_id, this.client.gateway.totalShards), packet);
|
|
61
60
|
}
|
|
62
61
|
else {
|
|
63
|
-
this.client.shards.get(
|
|
62
|
+
this.client.shards.get(this.client.calculateShardId(packet.d.guild_id))?.send(true, packet);
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
async resolveUser(user) {
|
package/package.json
CHANGED
|
@@ -1,110 +1,107 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "magmastream",
|
|
3
|
-
"version": "2.10.2-dev.
|
|
4
|
-
"description": "A user-friendly Lavalink client designed for NodeJS.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"prepare": "npm run build",
|
|
12
|
-
"build": "tsc",
|
|
13
|
-
"types": "rtb --dist dist",
|
|
14
|
-
"format": "prettier --write .",
|
|
15
|
-
"format:check": "prettier --check .",
|
|
16
|
-
"lint": "eslint \"src/**/*.{ts,js}\"",
|
|
17
|
-
"lint:fix": "eslint --fix \"src/**/*.{ts,js}\"",
|
|
18
|
-
"ci": "run-s format:check lint build types",
|
|
19
|
-
"release:alpha": "npm run format && npm run lint:fix && npm run ci && npm version prerelease --preid=alpha && npm publish --tag alpha && git push && git push --follow-tags",
|
|
20
|
-
"release:dev": "npm run format && npm run lint:fix && npm run ci && npm version prerelease --preid=dev && npm publish --tag dev && git push && git push --follow-tags"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@favware/rollup-type-bundler": "^4.0.0",
|
|
24
|
-
"@types/jsdom": "^28.0.0",
|
|
25
|
-
"@types/lodash": "^4.17.24",
|
|
26
|
-
"@types/node": "^25.3.5",
|
|
27
|
-
"@types/ws": "^8.18.1",
|
|
28
|
-
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
29
|
-
"@typescript-eslint/parser": "^8.56.1",
|
|
30
|
-
"eslint": "^10.0.3",
|
|
31
|
-
"npm-run-all": "^4.1.5",
|
|
32
|
-
"prettier": "^3.8.1",
|
|
33
|
-
"typedoc": "^0.28.17",
|
|
34
|
-
"typedoc-plugin-no-inherit": "^1.6.1",
|
|
35
|
-
"typescript": "^5.9.3"
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"@discordjs/collection": "^2.1.1",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"ws": "^8.19.0"
|
|
47
|
-
},
|
|
48
|
-
"optionalDependencies": {
|
|
49
|
-
"cloudstorm": "0.17.x",
|
|
50
|
-
"discord.js": "14.x",
|
|
51
|
-
"discordeno": "21.x",
|
|
52
|
-
"eris": "0.18.x",
|
|
53
|
-
"oceanic.js": "1.14.x",
|
|
54
|
-
"seyfert": "4.x"
|
|
55
|
-
},
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
},
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"author": "Abel Purnwasy",
|
|
109
|
-
"license": "Apache-2.0"
|
|
110
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "magmastream",
|
|
3
|
+
"version": "2.10.2-dev.2",
|
|
4
|
+
"description": "A user-friendly Lavalink client designed for NodeJS.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"prepare": "npm run build",
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"types": "rtb --dist dist",
|
|
14
|
+
"format": "prettier --write .",
|
|
15
|
+
"format:check": "prettier --check .",
|
|
16
|
+
"lint": "eslint \"src/**/*.{ts,js}\"",
|
|
17
|
+
"lint:fix": "eslint --fix \"src/**/*.{ts,js}\"",
|
|
18
|
+
"ci": "run-s format:check lint build types",
|
|
19
|
+
"release:alpha": "npm run format && npm run lint:fix && npm run ci && npm version prerelease --preid=alpha && npm publish --tag alpha && git push && git push --follow-tags",
|
|
20
|
+
"release:dev": "npm run format && npm run lint:fix && npm run ci && npm version prerelease --preid=dev && npm publish --tag dev && git push && git push --follow-tags"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@favware/rollup-type-bundler": "^4.0.0",
|
|
24
|
+
"@types/jsdom": "^28.0.0",
|
|
25
|
+
"@types/lodash": "^4.17.24",
|
|
26
|
+
"@types/node": "^25.3.5",
|
|
27
|
+
"@types/ws": "^8.18.1",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
29
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
30
|
+
"eslint": "^10.0.3",
|
|
31
|
+
"npm-run-all": "^4.1.5",
|
|
32
|
+
"prettier": "^3.8.1",
|
|
33
|
+
"typedoc": "^0.28.17",
|
|
34
|
+
"typedoc-plugin-no-inherit": "^1.6.1",
|
|
35
|
+
"typescript": "^5.9.3"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@discordjs/collection": "^2.1.1",
|
|
39
|
+
"events": "^3.3.0",
|
|
40
|
+
"ioredis": "^5.10.0",
|
|
41
|
+
"jsdom": "^28.1.0",
|
|
42
|
+
"lodash": "^4.17.23",
|
|
43
|
+
"safe-stable-stringify": "^2.5.0",
|
|
44
|
+
"tslib": "^2.8.1",
|
|
45
|
+
"undici": "7.24.6",
|
|
46
|
+
"ws": "^8.19.0"
|
|
47
|
+
},
|
|
48
|
+
"optionalDependencies": {
|
|
49
|
+
"cloudstorm": "0.17.x",
|
|
50
|
+
"discord.js": "14.x",
|
|
51
|
+
"discordeno": "21.x",
|
|
52
|
+
"eris": "0.18.x",
|
|
53
|
+
"oceanic.js": "1.14.x",
|
|
54
|
+
"seyfert": "4.x"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=20.19.0"
|
|
58
|
+
},
|
|
59
|
+
"eslintConfig": {
|
|
60
|
+
"root": true,
|
|
61
|
+
"parser": "@typescript-eslint/parser",
|
|
62
|
+
"plugins": [
|
|
63
|
+
"@typescript-eslint"
|
|
64
|
+
],
|
|
65
|
+
"rules": {
|
|
66
|
+
"object-curly-spacing": [
|
|
67
|
+
"error",
|
|
68
|
+
"always"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"extends": [
|
|
72
|
+
"eslint:recommended",
|
|
73
|
+
"plugin:@typescript-eslint/recommended"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"keywords": [
|
|
77
|
+
"lavalink client",
|
|
78
|
+
"wrapper",
|
|
79
|
+
"typescript",
|
|
80
|
+
"discord.js",
|
|
81
|
+
"node.js",
|
|
82
|
+
"java",
|
|
83
|
+
"javascript",
|
|
84
|
+
"audio streaming",
|
|
85
|
+
"music bot",
|
|
86
|
+
"voice chat",
|
|
87
|
+
"discord integration",
|
|
88
|
+
"high performance",
|
|
89
|
+
"scalable",
|
|
90
|
+
"easy-to-use",
|
|
91
|
+
"feature-rich",
|
|
92
|
+
"cross-platform",
|
|
93
|
+
"seamless integration",
|
|
94
|
+
"community support",
|
|
95
|
+
"documentation",
|
|
96
|
+
"open-source",
|
|
97
|
+
"lavalink",
|
|
98
|
+
"magmastream"
|
|
99
|
+
],
|
|
100
|
+
"repository": {
|
|
101
|
+
"type": "git",
|
|
102
|
+
"url": "https://gitryx.com/MagmaStream/magmastream.git"
|
|
103
|
+
},
|
|
104
|
+
"homepage": "https://docs.magmastream.com",
|
|
105
|
+
"author": "Abel Purnwasy",
|
|
106
|
+
"license": "Apache-2.0"
|
|
107
|
+
}
|