discord-player 5.2.3-dev → 5.3.0-dev.0
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/LICENSE +21 -21
- package/README.md +23 -19
- package/dist/Player.js +283 -274
- package/dist/Structures/ExtractorModel.js +19 -24
- package/dist/Structures/Playlist.js +1 -2
- package/dist/Structures/Queue.js +223 -236
- package/dist/Structures/Track.js +11 -14
- package/dist/VoiceInterface/StreamDispatcher.js +32 -40
- package/dist/VoiceInterface/VoiceUtils.js +21 -29
- package/dist/index.d.ts +10 -7
- package/dist/smoothVolume.js +1 -1
- package/dist/utils/Util.js +34 -1
- package/package.json +24 -28
package/dist/Structures/Track.js
CHANGED
|
@@ -10,7 +10,7 @@ class Track {
|
|
|
10
10
|
*/
|
|
11
11
|
constructor(player, data) {
|
|
12
12
|
this.raw = {};
|
|
13
|
-
this.id = discord_js_1.SnowflakeUtil.generate();
|
|
13
|
+
this.id = discord_js_1.SnowflakeUtil.generate().toString();
|
|
14
14
|
/**
|
|
15
15
|
* The player that instantiated this Track
|
|
16
16
|
* @name Track#player
|
|
@@ -82,17 +82,16 @@ class Track {
|
|
|
82
82
|
void this._patch(data);
|
|
83
83
|
}
|
|
84
84
|
_patch(data) {
|
|
85
|
-
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
this.views = (_f = data.views) !== null && _f !== void 0 ? _f : 0;
|
|
85
|
+
this.title = (0, discord_js_1.escapeMarkdown)(data.title ?? "");
|
|
86
|
+
this.author = data.author ?? "";
|
|
87
|
+
this.url = data.url ?? "";
|
|
88
|
+
this.thumbnail = data.thumbnail ?? "";
|
|
89
|
+
this.duration = data.duration ?? "";
|
|
90
|
+
this.views = data.views ?? 0;
|
|
92
91
|
this.requestedBy = data.requestedBy;
|
|
93
92
|
this.playlist = data.playlist;
|
|
94
93
|
// raw
|
|
95
|
-
Object.defineProperty(this, "raw", { value: Object.assign({}, { source:
|
|
94
|
+
Object.defineProperty(this, "raw", { value: Object.assign({}, { source: data.raw?.source ?? data.source }, data.raw ?? data), enumerable: false });
|
|
96
95
|
}
|
|
97
96
|
/**
|
|
98
97
|
* The queue in which this track is located
|
|
@@ -123,8 +122,7 @@ class Track {
|
|
|
123
122
|
* @type {TrackSource}
|
|
124
123
|
*/
|
|
125
124
|
get source() {
|
|
126
|
-
|
|
127
|
-
return (_a = this.raw.source) !== null && _a !== void 0 ? _a : "arbitrary";
|
|
125
|
+
return this.raw.source ?? "arbitrary";
|
|
128
126
|
}
|
|
129
127
|
/**
|
|
130
128
|
* String representation of this track
|
|
@@ -138,7 +136,6 @@ class Track {
|
|
|
138
136
|
* @returns {TrackJSON}
|
|
139
137
|
*/
|
|
140
138
|
toJSON(hidePlaylist) {
|
|
141
|
-
var _a, _b, _c;
|
|
142
139
|
return {
|
|
143
140
|
id: this.id,
|
|
144
141
|
title: this.title,
|
|
@@ -149,8 +146,8 @@ class Track {
|
|
|
149
146
|
duration: this.duration,
|
|
150
147
|
durationMS: this.durationMS,
|
|
151
148
|
views: this.views,
|
|
152
|
-
requestedBy:
|
|
153
|
-
playlist: hidePlaylist ? null :
|
|
149
|
+
requestedBy: this.requestedBy?.id,
|
|
150
|
+
playlist: hidePlaylist ? null : this.playlist?.toJSON() ?? null
|
|
154
151
|
};
|
|
155
152
|
}
|
|
156
153
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StreamDispatcher = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const voice_1 = require("@discordjs/voice");
|
|
6
5
|
const tiny_typed_emitter_1 = require("tiny-typed-emitter");
|
|
7
6
|
const Util_1 = require("../utils/Util");
|
|
@@ -37,14 +36,13 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
37
36
|
* @type {boolean}
|
|
38
37
|
*/
|
|
39
38
|
this.paused = false;
|
|
40
|
-
|
|
41
|
-
this.voiceConnection.on("stateChange", (_, newState) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
this.voiceConnection.on("stateChange", async (_, newState) => {
|
|
42
40
|
if (newState.status === voice_1.VoiceConnectionStatus.Disconnected) {
|
|
43
41
|
if (newState.reason === voice_1.VoiceConnectionDisconnectReason.WebSocketClose && newState.closeCode === 4014) {
|
|
44
42
|
try {
|
|
45
|
-
|
|
43
|
+
await (0, voice_1.entersState)(this.voiceConnection, voice_1.VoiceConnectionStatus.Connecting, this.connectionTimeout);
|
|
46
44
|
}
|
|
47
|
-
catch
|
|
45
|
+
catch {
|
|
48
46
|
try {
|
|
49
47
|
this.voiceConnection.destroy();
|
|
50
48
|
}
|
|
@@ -54,7 +52,7 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
else if (this.voiceConnection.rejoinAttempts < 5) {
|
|
57
|
-
|
|
55
|
+
await Util_1.Util.wait((this.voiceConnection.rejoinAttempts + 1) * 5000);
|
|
58
56
|
this.voiceConnection.rejoin();
|
|
59
57
|
}
|
|
60
58
|
else {
|
|
@@ -72,9 +70,9 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
72
70
|
else if (!this.readyLock && (newState.status === voice_1.VoiceConnectionStatus.Connecting || newState.status === voice_1.VoiceConnectionStatus.Signalling)) {
|
|
73
71
|
this.readyLock = true;
|
|
74
72
|
try {
|
|
75
|
-
|
|
73
|
+
await (0, voice_1.entersState)(this.voiceConnection, voice_1.VoiceConnectionStatus.Ready, this.connectionTimeout);
|
|
76
74
|
}
|
|
77
|
-
catch
|
|
75
|
+
catch {
|
|
78
76
|
if (this.voiceConnection.state.status !== voice_1.VoiceConnectionStatus.Destroyed) {
|
|
79
77
|
try {
|
|
80
78
|
this.voiceConnection.destroy();
|
|
@@ -88,8 +86,7 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
88
86
|
this.readyLock = false;
|
|
89
87
|
}
|
|
90
88
|
}
|
|
91
|
-
})
|
|
92
|
-
// @ts-expect-error ???
|
|
89
|
+
});
|
|
93
90
|
this.audioPlayer.on("stateChange", (oldState, newState) => {
|
|
94
91
|
if (newState.status === voice_1.AudioPlayerStatus.Playing) {
|
|
95
92
|
if (!this.paused)
|
|
@@ -114,12 +111,11 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
114
111
|
*/
|
|
115
112
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
116
113
|
createStream(src, ops) {
|
|
117
|
-
var _a;
|
|
118
114
|
this.audioResource = (0, voice_1.createAudioResource)(src, {
|
|
119
|
-
inputType:
|
|
120
|
-
metadata: ops
|
|
115
|
+
inputType: ops?.type ?? voice_1.StreamType.Arbitrary,
|
|
116
|
+
metadata: ops?.data,
|
|
121
117
|
// eslint-disable-next-line no-extra-boolean-cast
|
|
122
|
-
inlineVolume: !Boolean(ops
|
|
118
|
+
inlineVolume: !Boolean(ops?.disableVolume)
|
|
123
119
|
});
|
|
124
120
|
return this.audioResource;
|
|
125
121
|
}
|
|
@@ -139,7 +135,7 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
139
135
|
this.audioPlayer.stop(true);
|
|
140
136
|
this.voiceConnection.destroy();
|
|
141
137
|
}
|
|
142
|
-
catch
|
|
138
|
+
catch { } // eslint-disable-line no-empty
|
|
143
139
|
}
|
|
144
140
|
/**
|
|
145
141
|
* Stops the player
|
|
@@ -172,30 +168,28 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
172
168
|
* @param {AudioResource<Track>} [resource=this.audioResource] The audio resource to play
|
|
173
169
|
* @returns {Promise<StreamDispatcher>}
|
|
174
170
|
*/
|
|
175
|
-
playStream(resource = this.audioResource) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
if (this.voiceConnection.state.status !== voice_1.VoiceConnectionStatus.Ready) {
|
|
184
|
-
try {
|
|
185
|
-
yield (0, voice_1.entersState)(this.voiceConnection, voice_1.VoiceConnectionStatus.Ready, this.connectionTimeout);
|
|
186
|
-
}
|
|
187
|
-
catch (err) {
|
|
188
|
-
return void this.emit("error", err);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
171
|
+
async playStream(resource = this.audioResource) {
|
|
172
|
+
if (!resource)
|
|
173
|
+
throw new PlayerError_1.PlayerError("Audio resource is not available!", PlayerError_1.ErrorStatusCode.NO_AUDIO_RESOURCE);
|
|
174
|
+
if (resource.ended)
|
|
175
|
+
return void this.emit("error", new PlayerError_1.PlayerError("Cannot play a resource that has already ended."));
|
|
176
|
+
if (!this.audioResource)
|
|
177
|
+
this.audioResource = resource;
|
|
178
|
+
if (this.voiceConnection.state.status !== voice_1.VoiceConnectionStatus.Ready) {
|
|
191
179
|
try {
|
|
192
|
-
this.
|
|
180
|
+
await (0, voice_1.entersState)(this.voiceConnection, voice_1.VoiceConnectionStatus.Ready, this.connectionTimeout);
|
|
193
181
|
}
|
|
194
|
-
catch (
|
|
195
|
-
this.emit("error",
|
|
182
|
+
catch (err) {
|
|
183
|
+
return void this.emit("error", err);
|
|
196
184
|
}
|
|
197
|
-
|
|
198
|
-
|
|
185
|
+
}
|
|
186
|
+
try {
|
|
187
|
+
this.audioPlayer.play(resource);
|
|
188
|
+
}
|
|
189
|
+
catch (e) {
|
|
190
|
+
this.emit("error", e);
|
|
191
|
+
}
|
|
192
|
+
return this;
|
|
199
193
|
}
|
|
200
194
|
/**
|
|
201
195
|
* Sets playback volume
|
|
@@ -203,8 +197,7 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
203
197
|
* @returns {boolean}
|
|
204
198
|
*/
|
|
205
199
|
setVolume(value) {
|
|
206
|
-
|
|
207
|
-
if (!((_a = this.audioResource) === null || _a === void 0 ? void 0 : _a.volume) || isNaN(value) || value < 0 || value > Infinity)
|
|
200
|
+
if (!this.audioResource?.volume || isNaN(value) || value < 0 || value > Infinity)
|
|
208
201
|
return false;
|
|
209
202
|
this.audioResource.volume.setVolumeLogarithmic(value / 100);
|
|
210
203
|
return true;
|
|
@@ -214,8 +207,7 @@ class StreamDispatcher extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
214
207
|
* @type {number}
|
|
215
208
|
*/
|
|
216
209
|
get volume() {
|
|
217
|
-
|
|
218
|
-
if (!((_a = this.audioResource) === null || _a === void 0 ? void 0 : _a.volume))
|
|
210
|
+
if (!this.audioResource?.volume)
|
|
219
211
|
return 100;
|
|
220
212
|
const currentVol = this.audioResource.volume.volume;
|
|
221
213
|
return Math.round(Math.pow(currentVol, 1 / 1.660964) * 100);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VoiceUtils = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const discord_js_1 = require("discord.js");
|
|
6
5
|
const voice_1 = require("@discordjs/voice");
|
|
7
6
|
const StreamDispatcher_1 = require("./StreamDispatcher");
|
|
@@ -23,13 +22,11 @@ class VoiceUtils {
|
|
|
23
22
|
* @param {object} [options={}] Join options
|
|
24
23
|
* @returns {Promise<StreamDispatcher>}
|
|
25
24
|
*/
|
|
26
|
-
connect(channel, options) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return sub;
|
|
32
|
-
});
|
|
25
|
+
async connect(channel, options) {
|
|
26
|
+
const conn = await this.join(channel, options);
|
|
27
|
+
const sub = new StreamDispatcher_1.StreamDispatcher(conn, channel, options.maxTime);
|
|
28
|
+
this.cache.set(channel.guild.id, sub);
|
|
29
|
+
return sub;
|
|
33
30
|
}
|
|
34
31
|
/**
|
|
35
32
|
* Joins a voice channel
|
|
@@ -37,29 +34,24 @@ class VoiceUtils {
|
|
|
37
34
|
* @param {object} [options={}] Join options
|
|
38
35
|
* @returns {VoiceConnection}
|
|
39
36
|
*/
|
|
40
|
-
join(channel, options) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
selfDeaf: Boolean(options.deaf)
|
|
47
|
-
});
|
|
48
|
-
return conn;
|
|
37
|
+
async join(channel, options) {
|
|
38
|
+
const conn = (0, voice_1.joinVoiceChannel)({
|
|
39
|
+
guildId: channel.guild.id,
|
|
40
|
+
channelId: channel.id,
|
|
41
|
+
adapterCreator: channel.guild.voiceAdapterCreator,
|
|
42
|
+
selfDeaf: Boolean(options.deaf)
|
|
49
43
|
});
|
|
44
|
+
return conn;
|
|
50
45
|
}
|
|
51
|
-
enterReady(conn, options = {}) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
throw err;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
46
|
+
async enterReady(conn, options = {}) {
|
|
47
|
+
try {
|
|
48
|
+
conn = await (0, voice_1.entersState)(conn, voice_1.VoiceConnectionStatus.Ready, options?.maxTime ?? 20000);
|
|
49
|
+
return conn;
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
conn.destroy();
|
|
53
|
+
throw err;
|
|
54
|
+
}
|
|
63
55
|
}
|
|
64
56
|
/**
|
|
65
57
|
* Disconnects voice connection
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { User,
|
|
2
|
+
import { User, VoiceChannel, StageChannel, Collection, Snowflake, Client, GuildResolvable, Guild, GuildChannelResolvable, UserResolvable } from 'discord.js';
|
|
3
3
|
import { Readable, Duplex } from 'stream';
|
|
4
4
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
5
5
|
import { AudioPlayerError, AudioResource, VoiceConnection, AudioPlayer, StreamType, AudioPlayerStatus } from '@discordjs/voice';
|
|
6
6
|
import { downloadOptions } from 'ytdl-core';
|
|
7
|
+
import * as undici from 'undici';
|
|
7
8
|
|
|
8
9
|
declare class Playlist {
|
|
9
10
|
readonly player: Player;
|
|
@@ -47,7 +48,7 @@ declare class Track {
|
|
|
47
48
|
requestedBy: User;
|
|
48
49
|
playlist?: Playlist;
|
|
49
50
|
readonly raw: RawTrackData;
|
|
50
|
-
readonly id:
|
|
51
|
+
readonly id: string;
|
|
51
52
|
/**
|
|
52
53
|
* Track constructor
|
|
53
54
|
* @param {Player} player The player that instantiated this Track
|
|
@@ -330,7 +331,7 @@ declare class Queue<T = unknown> {
|
|
|
330
331
|
playing: boolean;
|
|
331
332
|
metadata?: T;
|
|
332
333
|
repeatMode: QueueRepeatMode;
|
|
333
|
-
readonly id:
|
|
334
|
+
readonly id: string;
|
|
334
335
|
private _streamTime;
|
|
335
336
|
_cooldownsTimeout: Collection<string, NodeJS.Timeout>;
|
|
336
337
|
private _activeFilters;
|
|
@@ -465,16 +466,16 @@ declare class Queue<T = unknown> {
|
|
|
465
466
|
shuffle(): boolean;
|
|
466
467
|
/**
|
|
467
468
|
* Removes a track from the queue
|
|
468
|
-
* @param {Track|
|
|
469
|
+
* @param {Track|string|number} track The track to remove
|
|
469
470
|
* @returns {Track}
|
|
470
471
|
*/
|
|
471
|
-
remove(track: Track |
|
|
472
|
+
remove(track: Track | string | number): Track;
|
|
472
473
|
/**
|
|
473
474
|
* Returns the index of the specified track. If found, returns the track index else returns -1.
|
|
474
|
-
* @param {number|Track|
|
|
475
|
+
* @param {number|Track|string} track The track
|
|
475
476
|
* @returns {number}
|
|
476
477
|
*/
|
|
477
|
-
getTrackPosition(track: number | Track |
|
|
478
|
+
getTrackPosition(track: number | Track | string): number;
|
|
478
479
|
/**
|
|
479
480
|
* Jumps to particular track
|
|
480
481
|
* @param {Track|number} track The track
|
|
@@ -661,6 +662,7 @@ interface PlayerProgressbarOptions {
|
|
|
661
662
|
length?: number;
|
|
662
663
|
line?: string;
|
|
663
664
|
indicator?: string;
|
|
665
|
+
queue?: boolean;
|
|
664
666
|
}
|
|
665
667
|
/**
|
|
666
668
|
* @typedef {object} PlayerOptions
|
|
@@ -1184,6 +1186,7 @@ declare class Util {
|
|
|
1184
1186
|
*/
|
|
1185
1187
|
static wait(time: number): Promise<unknown>;
|
|
1186
1188
|
static noop(): void;
|
|
1189
|
+
static getFetch(): Promise<typeof fetch | typeof undici.default>;
|
|
1187
1190
|
}
|
|
1188
1191
|
|
|
1189
1192
|
declare const version: string;
|
package/dist/smoothVolume.js
CHANGED
package/dist/utils/Util.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.Util = void 0;
|
|
4
27
|
class Util {
|
|
@@ -73,7 +96,7 @@ class Util {
|
|
|
73
96
|
try {
|
|
74
97
|
return require(id);
|
|
75
98
|
}
|
|
76
|
-
catch
|
|
99
|
+
catch {
|
|
77
100
|
return null;
|
|
78
101
|
}
|
|
79
102
|
}
|
|
@@ -86,5 +109,15 @@ class Util {
|
|
|
86
109
|
return new Promise((r) => setTimeout(r, time).unref());
|
|
87
110
|
}
|
|
88
111
|
static noop() { } // eslint-disable-line @typescript-eslint/no-empty-function
|
|
112
|
+
static async getFetch() {
|
|
113
|
+
if ("fetch" in globalThis)
|
|
114
|
+
return globalThis.fetch;
|
|
115
|
+
try {
|
|
116
|
+
return await Promise.resolve().then(() => __importStar(require("undici"))).then((res) => res.default);
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
// uh?
|
|
120
|
+
}
|
|
121
|
+
}
|
|
89
122
|
}
|
|
90
123
|
exports.Util = Util;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "discord-player",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0-dev.0",
|
|
4
4
|
"description": "Complete framework to facilitate music commands using discord.js",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"build:check": "tsc --noEmit --incremental false",
|
|
24
24
|
"prepublishOnly": "rollup-type-bundler -e stream",
|
|
25
25
|
"build:esm": "gen-esm-wrapper ./dist/index.js ./dist/index.mjs",
|
|
26
|
-
"format": "prettier --write \"src/**/*.ts\"
|
|
27
|
-
"docs": "
|
|
28
|
-
"
|
|
26
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
27
|
+
"docs": "typedoc --json docs/typedoc.json src/index.ts",
|
|
28
|
+
"postdocs": "node scripts/docgen.js",
|
|
29
29
|
"lint": "eslint src --ext .ts",
|
|
30
30
|
"prepare": "husky install",
|
|
31
31
|
"lint:fix": "eslint src --ext .ts --fix"
|
|
@@ -65,37 +65,33 @@
|
|
|
65
65
|
},
|
|
66
66
|
"homepage": "https://discord-player.js.org",
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@discordjs/voice": "^0.
|
|
68
|
+
"@discordjs/voice": "^0.11.0",
|
|
69
69
|
"discord-ytdl-core": "^5.0.4",
|
|
70
70
|
"libsodium-wrappers": "^0.7.10",
|
|
71
|
-
"soundcloud-scraper": "^5.0.
|
|
72
|
-
"spotify-url-info": "^3.
|
|
71
|
+
"soundcloud-scraper": "^5.0.3",
|
|
72
|
+
"spotify-url-info": "^3.1.2",
|
|
73
73
|
"tiny-typed-emitter": "^2.1.0",
|
|
74
|
-
"
|
|
74
|
+
"tslib": "^2.4.0",
|
|
75
|
+
"youtube-sr": "^4.2.0",
|
|
75
76
|
"ytdl-core": "^4.11.0"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"@
|
|
82
|
-
"@
|
|
83
|
-
"@
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"@types/ws": "^8.2.0",
|
|
88
|
-
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
89
|
-
"@typescript-eslint/parser": "^5.4.0",
|
|
90
|
-
"discord-api-types": "^0.24.0",
|
|
91
|
-
"discord.js": "^13.6.0",
|
|
92
|
-
"eslint": "^8.3.0",
|
|
79
|
+
"@discordjs/ts-docgen": "^0.4.1",
|
|
80
|
+
"@favware/rollup-type-bundler": "^1.0.9",
|
|
81
|
+
"@types/node": "^18.0.6",
|
|
82
|
+
"@types/ws": "^8.5.3",
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
|
84
|
+
"@typescript-eslint/parser": "^5.30.7",
|
|
85
|
+
"discord-api-types": "^0.36.2",
|
|
86
|
+
"discord.js": "^14.0.2",
|
|
87
|
+
"eslint": "^8.20.0",
|
|
93
88
|
"gen-esm-wrapper": "^1.1.3",
|
|
94
|
-
"husky": "^
|
|
95
|
-
"
|
|
96
|
-
"prettier": "^2.
|
|
89
|
+
"husky": "^8.0.1",
|
|
90
|
+
"opusscript": "^0.0.8",
|
|
91
|
+
"prettier": "^2.7.1",
|
|
97
92
|
"rimraf": "^3.0.2",
|
|
98
|
-
"ts-node": "^10.
|
|
99
|
-
"
|
|
93
|
+
"ts-node": "^10.9.1",
|
|
94
|
+
"typedoc": "^0.23.8",
|
|
95
|
+
"typescript": "^4.7.4"
|
|
100
96
|
}
|
|
101
97
|
}
|