distube 3.0.2 → 3.0.6

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/README.md CHANGED
@@ -30,12 +30,6 @@ A Discord.js module to simplify your music commands and play songs with audio fi
30
30
  - Autoplay related songs
31
31
  - Plugin system to support more sites ([Plugin List](https://distube.js.org/#/docs/DisTube/stable/plugin/list))
32
32
 
33
- ## Installation
34
-
35
- ```npm
36
- npm install distube
37
- ```
38
-
39
33
  ### Requirement
40
34
 
41
35
  - Node v12 or higher
@@ -46,6 +40,12 @@ npm install distube
46
40
  - [sodium](https://www.npmjs.com/package/sodium) or [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers)
47
41
  - [python](https://www.python.org/) _(Optional - For [`youtube-dl`](https://youtube-dl.org/) to support [700+ more sites](https://ytdl-org.github.io/youtube-dl/supportedsites.html).)_
48
42
 
43
+ ## Installation
44
+
45
+ ```npm
46
+ npm install distube@latest
47
+ ```
48
+
49
49
  ## Documentation
50
50
 
51
51
  Read DisTube's definitions, properties and events details in the [Documentation page](https://distube.js.org/).
@@ -1 +1 @@
1
- {"version":3,"file":"DisTubeStream.d.ts","sourceRoot":"","sources":["../../src/core/DisTubeStream.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,oBAAoB,CAAC;AAE3C,UAAU,aAAc,SAAQ,IAAI,CAAC,eAAe;IAClD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,YAAa,KAAK,WAAW,EAAE,uCAOhE,CAAC;AAEF;;;GAGG;AACH,qBAAa,aAAa;IACxB;;;;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MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;gBACS,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;CA2ChD;AAED,eAAe,aAAa,CAAC"}
@@ -42,8 +42,6 @@ class DisTubeStream {
42
42
  "1",
43
43
  "-reconnect_streamed",
44
44
  "1",
45
- "-reconnect_at_eof",
46
- "1",
47
45
  "-reconnect_delay_max",
48
46
  "5",
49
47
  "-i",
@@ -1 +1 @@
1
- {"version":3,"file":"DisTubeStream.js","sourceRoot":"","sources":["../../src/core/DisTubeStream.ts"],"names":[],"mappings":";;;AAAA,0BAA2B;AAC3B,6CAAqC;AACrC,sCAAyC;AACzC,4CAA8C;AAkBvC,MAAM,qBAAqB,GAAG,CAAC,OAA2B,EAAE,MAAM,GAAG,KAAK,EAAE,EAAE;IACnF,IAAI,MAAM,GAAG,CAAC,MAAwB,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC3D,IAAI,MAAM;QAAE,MAAM,GAAG,CAAC,MAAwB,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC;IACnF,OAAO,GAAG,OAAO;SACd,MAAM,CAAC,MAAM,CAAC;SACd,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5G,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC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AO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YACrE,MAAM,IAAI,qBAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;SACtE;QACD,MAAM,UAAU,GAAG,IAAA,6BAAqB,EAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAClE,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,qBAAY,CAAC,oBAAoB,CAAC,CAAC;QAC9D,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IACD;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CAAC,GAAW,EAAE,UAAyB,EAAE;QACxD,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YACrE,MAAM,IAAI,qBAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;SACtE;QACD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAA,SAAK,EAAC,GAAG,CAAC,EAAE;YAC1C,MAAM,IAAI,qBAAY,CAAC,cAAc,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;SACvD;QACD,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;CAuDF;AAvFD,sCAuFC;AAED,kBAAe,aAAa,CAAC","sourcesContent":["import { isURL } from \"..\";\nimport { FFmpeg } from \"prism-media\";\nimport { DisTubeError } from \"../struct\";\nimport { StreamType } from \"@discordjs/voice\";\nimport type ytdl from \"@distube/ytdl-core\";\n\ninterface StreamOptions extends ytdl.downloadOptions {\n /**\n * Time to seek in seconds\n */\n seek?: number;\n /**\n * Additional FFmpeg arguments\n */\n ffmpegArgs?: string[];\n /**\n * If the stream url is live\n */\n isLive?: boolean;\n}\n\nexport const chooseBestVideoFormat = (formats: ytdl.videoFormat[], isLive = false) => {\n let filter = (format: ytdl.videoFormat) => format.hasAudio;\n if (isLive) filter = (format: ytdl.videoFormat) => format.hasAudio && format.isHLS;\n formats = formats\n .filter(filter)\n .sort((a, b) => Number(b.audioBitrate) - Number(a.audioBitrate) || Number(a.bitrate) - Number(b.bitrate));\n return formats.find(format => !format.hasVideo) || formats.sort((a, b) => Number(a.bitrate) - Number(b.bitrate))[0];\n};\n\n/**\n * Create a stream to play with {@link DisTubeVoice}\n * @private\n */\nexport class DisTubeStream {\n /**\n * Create a stream from ytdl video formats\n * @param {ytdl.videoFormat[]} formats ytdl video formats\n * @param {StreamOptions} options options\n * @returns {DisTubeStream}\n * @private\n */\n static YouTube(formats: ytdl.videoFormat[] | undefined, options: StreamOptions = {}): DisTubeStream {\n if (!formats || !formats.length) throw new DisTubeError(\"UNAVAILABLE_VIDEO\");\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"object\", options, \"options\");\n }\n const bestFormat = chooseBestVideoFormat(formats, options.isLive);\n if (!bestFormat) throw new DisTubeError(\"UNPLAYABLE_FORMATS\");\n return new DisTubeStream(bestFormat.url, options);\n }\n /**\n * Create a stream from a stream url\n * @param {string} url stream url\n * @param {StreamOptions} options options\n * @returns {DisTubeStream}\n * @private\n */\n static DirectLink(url: string, options: StreamOptions = {}): DisTubeStream {\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"object\", options, \"options\");\n }\n if (typeof url !== \"string\" || !isURL(url)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"an URL\", url);\n }\n return new DisTubeStream(url, options);\n }\n type: StreamType.Raw;\n stream: FFmpeg;\n url: string;\n /**\n * Create a DisTubeStream to play with {@link DisTubeVoice}\n * @param {string} url Stream URL\n * @param {StreamOptions} options Stream options\n * @private\n */\n constructor(url: string, options: StreamOptions) {\n /**\n * Stream URL\n * @type {string}\n */\n this.url = url;\n /**\n * Stream type\n * @type {DiscordVoice.StreamType.Raw}\n */\n this.type = StreamType.Raw;\n const args = [\n \"-reconnect\",\n \"1\",\n \"-reconnect_streamed\",\n \"1\",\n \"-reconnect_at_eof\",\n \"1\",\n \"-reconnect_delay_max\",\n \"5\",\n \"-i\",\n url,\n \"-analyzeduration\",\n \"0\",\n \"-loglevel\",\n \"0\",\n \"-ar\",\n \"48000\",\n \"-ac\",\n \"2\",\n \"-f\",\n \"s16le\",\n ];\n if (typeof options.seek === \"number\" && options.seek > 0) {\n args.unshift(\"-ss\", options.seek.toString());\n }\n if (Array.isArray(options.ffmpegArgs)) {\n args.push(...options.ffmpegArgs);\n }\n /**\n * FFmpeg stream (Duplex)\n * @type {FFmpeg}\n */\n this.stream = new FFmpeg({ args, shell: false });\n }\n}\n\nexport default DisTubeStream;\n"]}
1
+ {"version":3,"file":"DisTubeStream.js","sourceRoot":"","sources":["../../src/core/DisTubeStream.ts"],"names":[],"mappings":";;;AAAA,0BAA2B;AAC3B,6CAAqC;AACrC,sCAAyC;AACzC,4CAA8C;AAkBvC,MAAM,qBAAqB,GAAG,CAAC,OAA2B,EAAE,MAAM,GAAG,KAAK,EAAE,EAAE;IACnF,IAAI,MAAM,GAAG,CAAC,MAAwB,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC3D,IAAI,MAAM;QAAE,MAAM,GAAG,CAAC,MAAwB,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC;IACnF,OAAO,GAAG,OAAO;SACd,MAAM,CAAC,MAAM,CAAC;SACd,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAA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peg } from \"prism-media\";\nimport { DisTubeError } from \"../struct\";\nimport { StreamType } from \"@discordjs/voice\";\nimport type ytdl from \"@distube/ytdl-core\";\n\ninterface StreamOptions extends ytdl.downloadOptions {\n /**\n * Time to seek in seconds\n */\n seek?: number;\n /**\n * Additional FFmpeg arguments\n */\n ffmpegArgs?: string[];\n /**\n * If the stream url is live\n */\n isLive?: boolean;\n}\n\nexport const chooseBestVideoFormat = (formats: ytdl.videoFormat[], isLive = false) => {\n let filter = (format: ytdl.videoFormat) => format.hasAudio;\n if (isLive) filter = (format: ytdl.videoFormat) => format.hasAudio && format.isHLS;\n formats = formats\n .filter(filter)\n .sort((a, b) => Number(b.audioBitrate) - Number(a.audioBitrate) || Number(a.bitrate) - Number(b.bitrate));\n return formats.find(format => !format.hasVideo) || formats.sort((a, b) => Number(a.bitrate) - Number(b.bitrate))[0];\n};\n\n/**\n * Create a stream to play with {@link DisTubeVoice}\n * @private\n */\nexport class DisTubeStream {\n /**\n * Create a stream from ytdl video formats\n * @param {ytdl.videoFormat[]} formats ytdl video formats\n * @param {StreamOptions} options options\n * @returns {DisTubeStream}\n * @private\n */\n static YouTube(formats: ytdl.videoFormat[] | undefined, options: StreamOptions = {}): DisTubeStream {\n if (!formats || !formats.length) throw new DisTubeError(\"UNAVAILABLE_VIDEO\");\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"object\", options, \"options\");\n }\n const bestFormat = chooseBestVideoFormat(formats, options.isLive);\n if (!bestFormat) throw new DisTubeError(\"UNPLAYABLE_FORMATS\");\n return new DisTubeStream(bestFormat.url, options);\n }\n /**\n * Create a stream from a stream url\n * @param {string} url stream url\n * @param {StreamOptions} options options\n * @returns {DisTubeStream}\n * @private\n */\n static DirectLink(url: string, options: StreamOptions = {}): DisTubeStream {\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"object\", options, \"options\");\n }\n if (typeof url !== \"string\" || !isURL(url)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"an URL\", url);\n }\n return new DisTubeStream(url, options);\n }\n type: StreamType.Raw;\n stream: FFmpeg;\n url: string;\n /**\n * Create a DisTubeStream to play with {@link DisTubeVoice}\n * @param {string} url Stream URL\n * @param {StreamOptions} options Stream options\n * @private\n */\n constructor(url: string, options: StreamOptions) {\n /**\n * Stream URL\n * @type {string}\n */\n this.url = url;\n /**\n * Stream type\n * @type {DiscordVoice.StreamType.Raw}\n */\n this.type = StreamType.Raw;\n const args = [\n \"-reconnect\",\n \"1\",\n \"-reconnect_streamed\",\n \"1\",\n \"-reconnect_delay_max\",\n \"5\",\n \"-i\",\n url,\n \"-analyzeduration\",\n \"0\",\n \"-loglevel\",\n \"0\",\n \"-ar\",\n \"48000\",\n \"-ac\",\n \"2\",\n \"-f\",\n \"s16le\",\n ];\n if (typeof options.seek === \"number\" && options.seek > 0) {\n args.unshift(\"-ss\", options.seek.toString());\n }\n if (Array.isArray(options.ffmpegArgs)) {\n args.push(...options.ffmpegArgs);\n }\n /**\n * FFmpeg stream (Duplex)\n * @type {FFmpeg}\n */\n this.stream = new FFmpeg({ args, shell: false });\n }\n}\n\nexport default DisTubeStream;\n"]}
@@ -157,8 +157,6 @@ class QueueManager extends _1.BaseManager {
157
157
  }
158
158
  if (queue.stopped)
159
159
  return false;
160
- queue.playing = true;
161
- queue.paused = false;
162
160
  const song = queue.songs[0];
163
161
  try {
164
162
  const { url, source, formats, streamURL } = song;
@@ -178,6 +176,10 @@ class QueueManager extends _1.BaseManager {
178
176
  const stream = this.handler.createStream(queue);
179
177
  queue.voice.play(stream);
180
178
  song.streamURL = stream.url;
179
+ if (queue.stopped)
180
+ queue.stop();
181
+ else if (queue.paused)
182
+ queue.voice.pause();
181
183
  return false;
182
184
  }
183
185
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"QueueManager.js","sourceRoot":"","sources":["../../../src/core/manager/QueueManager.ts"],"names":[],"mappings":";;;AAAA,w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C;YAC5B,OAAO,KAAK,CAAC;SACd;QAAC,OAAO,CAAM,EAAE;YACf,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IACD;;;;;OAKG;IACK,aAAa,CAAC,KAAY;;QAChC,OAAO,CACL,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe;YAC7B,CAAC,KAAK,CAAC,UAAU,KAAK,cAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC;YACpD,CAAC,KAAK,CAAC,UAAU,KAAK,cAAU,CAAC,IAAI,IAAI,CAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,0CAAE,EAAE,OAAK,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,0CAAE,EAAE,CAAA,CAAC,CACpF,CAAC;IACJ,CAAC;CACF;AAhLD,oCAgLC","sourcesContent":["import { BaseManager } from \".\";\nimport { DisTubeError, Queue, RepeatMode } from \"../..\";\nimport type { DisTubeVoiceEvents, Song } from \"../..\";\nimport type { StageChannel, TextChannel, VoiceChannel } from \"discord.js\";\n\n/**\n * Queue manager\n */\nexport class QueueManager extends BaseManager<Queue> {\n /**\n * Create a {@link Queue}\n * @private\n * @param {Discord.VoiceChannel|Discord.StageChannel} channel A voice channel\n * @param {Song|Song[]} song First song\n * @param {Discord.TextChannel} textChannel Default text channel\n * @returns {Promise<Queue|true>} Returns `true` if encounter an error\n */\n async create(\n channel: VoiceChannel | StageChannel,\n song: Song[] | Song,\n textChannel?: TextChannel,\n ): Promise<Queue | true> {\n if (this.has(channel.guild.id)) throw new DisTubeError(\"QUEUE_EXIST\");\n const voice = this.voices.create(channel);\n const queue = new Queue(this.distube, voice, song, textChannel);\n await queue.taskQueue.queuing();\n try {\n await voice.join();\n this._voiceEventHandler(queue);\n this.add(queue.id, queue);\n this.emit(\"initQueue\", queue);\n const err = await this.playSong(queue);\n return err || queue;\n } finally {\n queue.taskQueue.resolve();\n }\n }\n /**\n * Get a Queue from this QueueManager.\n * @method get\n * @memberof QueueManager#\n * @param {GuildIDResolvable} queue Resolvable thing from a guild\n * @returns {Queue?}\n */\n /**\n * Listen to DisTubeVoice events and handle the Queue\n * @private\n * @param {Queue} queue Queue\n */\n private _voiceEventHandler(queue: Queue) {\n queue.listeners = {\n disconnect: error => {\n queue.delete();\n this.emit(\"disconnect\", queue);\n if (error) this.emitError(error, queue.textChannel);\n },\n error: error => this._handlePlayingError(queue, error),\n finish: () => this._handleSongFinish(queue),\n };\n for (const event of Object.keys(queue.listeners) as (keyof DisTubeVoiceEvents)[]) {\n queue.voice.on(event, queue.listeners[event]);\n }\n }\n /**\n * Handle the queue when a Song finish\n * @private\n * @param {Queue} queue queue\n * @returns {Promise<void>}\n */\n private async _handleSongFinish(queue: Queue): Promise<void> {\n this.emit(\"finishSong\", queue, queue.songs[0]);\n await queue.taskQueue.queuing();\n try {\n if (queue.stopped) return;\n if (queue.repeatMode === RepeatMode.QUEUE && !queue.prev) queue.songs.push(queue.songs[0]);\n if (queue.prev) {\n if (queue.repeatMode === RepeatMode.QUEUE) queue.songs.unshift(queue.songs.pop() as Song);\n else queue.songs.unshift(queue.previousSongs.pop() as Song);\n }\n if (queue.songs.length <= 1 && (queue.next || queue.repeatMode === RepeatMode.DISABLED)) {\n if (queue.autoplay) {\n try {\n await queue.addRelatedSong();\n } catch {\n this.emit(\"noRelated\", queue);\n }\n }\n if (queue.songs.length <= 1) {\n if (this.options.leaveOnFinish) queue.voice.leave();\n if (!queue.autoplay) this.emit(\"finish\", queue);\n queue.delete();\n return;\n }\n }\n const emitPlaySong = this._emitPlaySong(queue);\n if (!queue.prev && (queue.repeatMode !== RepeatMode.SONG || queue.next)) {\n const prev = queue.songs.shift() as Song;\n delete prev.formats;\n delete prev.streamURL;\n if (this.options.savePreviousSongs) queue.previousSongs.push(prev);\n else queue.previousSongs.push({ id: prev.id } as Song);\n }\n queue.next = queue.prev = false;\n queue.beginTime = 0;\n const err = await this.playSong(queue);\n if (!err && emitPlaySong) this.emit(\"playSong\", queue, queue.songs[0]);\n } finally {\n queue.taskQueue.resolve();\n }\n }\n /**\n * Handle error while playing\n * @private\n * @param {Queue} queue queue\n * @param {Error} error error\n */\n private _handlePlayingError(queue: Queue, error: Error) {\n const song = queue.songs.shift() as Song;\n try {\n error.name = \"PlayingError\";\n error.message = `${error.message}\\nID: ${song.id}\\nName: ${song.name}`;\n } catch {}\n this.emitError(error, queue.textChannel);\n if (queue.songs.length > 0) {\n this.playSong(queue).then(e => {\n if (!e) this.emit(\"playSong\", queue, queue.songs[0]);\n });\n } else {\n queue.stop();\n }\n }\n\n /**\n * Play a song on voice connection\n * @private\n * @param {Queue} queue The guild queue\n * @returns {Promise<boolean>} error?\n */\n async playSong(queue: Queue): Promise<boolean> {\n if (!queue) return true;\n if (!queue.songs.length) {\n queue.stop();\n return true;\n }\n if (queue.stopped) return false;\n queue.playing = true;\n queue.paused = false;\n const song = queue.songs[0];\n try {\n const { url, source, formats, streamURL } = song;\n if (source === \"youtube\" && !formats) song._patchYouTube(await this.handler.getYouTubeInfo(url));\n if (source !== \"youtube\" && !streamURL) {\n for (const plugin of [...this.distube.extractorPlugins, ...this.distube.customPlugins]) {\n if (await plugin.validate(url)) {\n const info = [plugin.getStreamURL(url), plugin.getRelatedSongs(url)] as const;\n const result = await Promise.all(info);\n song.streamURL = result[0];\n song.related = result[1];\n break;\n }\n }\n }\n const stream = this.handler.createStream(queue);\n queue.voice.play(stream);\n song.streamURL = stream.url;\n return false;\n } catch (e: any) {\n this._handlePlayingError(queue, e);\n return true;\n }\n }\n /**\n * Whether or not emit playSong event\n * @param {Queue} queue Queue\n * @private\n * @returns {boolean}\n */\n private _emitPlaySong(queue: Queue): boolean {\n return (\n !this.options.emitNewSongOnly ||\n (queue.repeatMode === RepeatMode.SONG && queue.next) ||\n (queue.repeatMode !== RepeatMode.SONG && queue.songs[0]?.id !== queue.songs[1]?.id)\n );\n }\n}\n"]}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G,CAAC;YAC5B,IAAI,KAAK,CAAC,OAAO;gBAAE,KAAK,CAAC,IAAI,EAAE,CAAC;iBAC3B,IAAI,KAAK,CAAC,MAAM;gBAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAC3C,OAAO,KAAK,CAAC;SACd;QAAC,OAAO,CAAM,EAAE;YACf,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IACD;;;;;OAKG;IACK,aAAa,CAAC,KAAY;;QAChC,OAAO,CACL,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe;YAC7B,CAAC,KAAK,CAAC,UAAU,KAAK,cAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC;YACpD,CAAC,KAAK,CAAC,UAAU,KAAK,cAAU,CAAC,IAAI,IAAI,CAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,0CAAE,EAAE,OAAK,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,0CAAE,EAAE,CAAA,CAAC,CACpF,CAAC;IACJ,CAAC;CACF;AAhLD,oCAgLC","sourcesContent":["import { BaseManager } from \".\";\nimport { DisTubeError, Queue, RepeatMode } from \"../..\";\nimport type { DisTubeVoiceEvents, Song } from \"../..\";\nimport type { StageChannel, TextChannel, VoiceChannel } from \"discord.js\";\n\n/**\n * Queue manager\n */\nexport class QueueManager extends BaseManager<Queue> {\n /**\n * Create a {@link Queue}\n * @private\n * @param {Discord.VoiceChannel|Discord.StageChannel} channel A voice channel\n * @param {Song|Song[]} song First song\n * @param {Discord.TextChannel} textChannel Default text channel\n * @returns {Promise<Queue|true>} Returns `true` if encounter an error\n */\n async create(\n channel: VoiceChannel | StageChannel,\n song: Song[] | Song,\n textChannel?: TextChannel,\n ): Promise<Queue | true> {\n if (this.has(channel.guild.id)) throw new DisTubeError(\"QUEUE_EXIST\");\n const voice = this.voices.create(channel);\n const queue = new Queue(this.distube, voice, song, textChannel);\n await queue.taskQueue.queuing();\n try {\n await voice.join();\n this._voiceEventHandler(queue);\n this.add(queue.id, queue);\n this.emit(\"initQueue\", queue);\n const err = await this.playSong(queue);\n return err || queue;\n } finally {\n queue.taskQueue.resolve();\n }\n }\n /**\n * Get a Queue from this QueueManager.\n * @method get\n * @memberof QueueManager#\n * @param {GuildIDResolvable} queue Resolvable thing from a guild\n * @returns {Queue?}\n */\n /**\n * Listen to DisTubeVoice events and handle the Queue\n * @private\n * @param {Queue} queue Queue\n */\n private _voiceEventHandler(queue: Queue) {\n queue.listeners = {\n disconnect: error => {\n queue.delete();\n this.emit(\"disconnect\", queue);\n if (error) this.emitError(error, queue.textChannel);\n },\n error: error => this._handlePlayingError(queue, error),\n finish: () => this._handleSongFinish(queue),\n };\n for (const event of Object.keys(queue.listeners) as (keyof DisTubeVoiceEvents)[]) {\n queue.voice.on(event, queue.listeners[event]);\n }\n }\n /**\n * Handle the queue when a Song finish\n * @private\n * @param {Queue} queue queue\n * @returns {Promise<void>}\n */\n private async _handleSongFinish(queue: Queue): Promise<void> {\n this.emit(\"finishSong\", queue, queue.songs[0]);\n await queue.taskQueue.queuing();\n try {\n if (queue.stopped) return;\n if (queue.repeatMode === RepeatMode.QUEUE && !queue.prev) queue.songs.push(queue.songs[0]);\n if (queue.prev) {\n if (queue.repeatMode === RepeatMode.QUEUE) queue.songs.unshift(queue.songs.pop() as Song);\n else queue.songs.unshift(queue.previousSongs.pop() as Song);\n }\n if (queue.songs.length <= 1 && (queue.next || queue.repeatMode === RepeatMode.DISABLED)) {\n if (queue.autoplay) {\n try {\n await queue.addRelatedSong();\n } catch {\n this.emit(\"noRelated\", queue);\n }\n }\n if (queue.songs.length <= 1) {\n if (this.options.leaveOnFinish) queue.voice.leave();\n if (!queue.autoplay) this.emit(\"finish\", queue);\n queue.delete();\n return;\n }\n }\n const emitPlaySong = this._emitPlaySong(queue);\n if (!queue.prev && (queue.repeatMode !== RepeatMode.SONG || queue.next)) {\n const prev = queue.songs.shift() as Song;\n delete prev.formats;\n delete prev.streamURL;\n if (this.options.savePreviousSongs) queue.previousSongs.push(prev);\n else queue.previousSongs.push({ id: prev.id } as Song);\n }\n queue.next = queue.prev = false;\n queue.beginTime = 0;\n const err = await this.playSong(queue);\n if (!err && emitPlaySong) this.emit(\"playSong\", queue, queue.songs[0]);\n } finally {\n queue.taskQueue.resolve();\n }\n }\n /**\n * Handle error while playing\n * @private\n * @param {Queue} queue queue\n * @param {Error} error error\n */\n private _handlePlayingError(queue: Queue, error: Error) {\n const song = queue.songs.shift() as Song;\n try {\n error.name = \"PlayingError\";\n error.message = `${error.message}\\nID: ${song.id}\\nName: ${song.name}`;\n } catch {}\n this.emitError(error, queue.textChannel);\n if (queue.songs.length > 0) {\n this.playSong(queue).then(e => {\n if (!e) this.emit(\"playSong\", queue, queue.songs[0]);\n });\n } else {\n queue.stop();\n }\n }\n\n /**\n * Play a song on voice connection\n * @private\n * @param {Queue} queue The guild queue\n * @returns {Promise<boolean>} error?\n */\n async playSong(queue: Queue): Promise<boolean> {\n if (!queue) return true;\n if (!queue.songs.length) {\n queue.stop();\n return true;\n }\n if (queue.stopped) return false;\n const song = queue.songs[0];\n try {\n const { url, source, formats, streamURL } = song;\n if (source === \"youtube\" && !formats) song._patchYouTube(await this.handler.getYouTubeInfo(url));\n if (source !== \"youtube\" && !streamURL) {\n for (const plugin of [...this.distube.extractorPlugins, ...this.distube.customPlugins]) {\n if (await plugin.validate(url)) {\n const info = [plugin.getStreamURL(url), plugin.getRelatedSongs(url)] as const;\n const result = await Promise.all(info);\n song.streamURL = result[0];\n song.related = result[1];\n break;\n }\n }\n }\n const stream = this.handler.createStream(queue);\n queue.voice.play(stream);\n song.streamURL = stream.url;\n if (queue.stopped) queue.stop();\n else if (queue.paused) queue.voice.pause();\n return false;\n } catch (e: any) {\n this._handlePlayingError(queue, e);\n return true;\n }\n }\n /**\n * Whether or not emit playSong event\n * @param {Queue} queue Queue\n * @private\n * @returns {boolean}\n */\n private _emitPlaySong(queue: Queue): boolean {\n return (\n !this.options.emitNewSongOnly ||\n (queue.repeatMode === RepeatMode.SONG && queue.next) ||\n (queue.repeatMode !== RepeatMode.SONG && queue.songs[0]?.id !== queue.songs[1]?.id)\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DisTubeVoice.d.ts","sourceRoot":"","sources":["../../../src/core/voice/DisTubeVoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAWlD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEpF;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY,CAAC,kBAAkB,CAAC;IAChE,EAAE,EAAE,SAAS,CAAC;IACd,MAAM,EAAE,mBAAmB,CAAC;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAG,eAAe,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,EAAG,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,OAAO,CAAS;gBACZ,YAAY,EAAE,mBAAmB,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY;IAuDnF,IAAI,OAAO,IAGU,YAAY,GAAG,YAAY,CAD/C;IACD,IAAI,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,EAK/C;IACD,OAAO,CAAC,KAAK;IAOb;;;;;OAKG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,YAAY,GAAG,OAAO,CAAC,YAAY,C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C,EAAE,aAAa,CAAC;IAC9B,YAAY,EAAG,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,OAAO,CAAS;gBACZ,YAAY,EAAE,mBAAmB,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY;IAuDnF,IAAI,OAAO,IAGU,YAAY,GAAG,YAAY,CAD/C;IACD,IAAI,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,EAK/C;IACD,OAAO,CAAC,KAAK;IAOb;;;;;OAKG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAiBxE;;;OAGG;IACH,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK;IASnB;;;;;OAKG;IACH,IAAI,CAAC,KAAK,UAAQ;IAGlB;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE,aAAa;IAe1B,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,EASxB;IACD,IAAI,MAAM,IAVS,MAAM,CAYxB;IACD;;;OAGG;IACH,IAAI,gBAAgB,WAEnB;IACD,KAAK;IAGL,OAAO;IAGP;;;OAGG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD;;;OAGG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IASvC;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IASvC;;;OAGG;IACH,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAEvC;CACF;AAED,eAAe,YAAY,CAAC"}
@@ -44,7 +44,7 @@ class DisTubeVoice extends tiny_typed_emitter_1.TypedEmitter {
44
44
  this.connection
45
45
  .on(voice_1.VoiceConnectionStatus.Disconnected, (_, newState) => {
46
46
  if (newState.reason === voice_1.VoiceConnectionDisconnectReason.WebSocketClose && newState.closeCode === 4014) {
47
- (0, voice_1.entersState)(this.connection, voice_1.VoiceConnectionStatus.Connecting, 5e3).catch(() => {
47
+ (0, __1.entersState)(this.connection, voice_1.VoiceConnectionStatus.Connecting, 5e3).catch(() => {
48
48
  this.leave();
49
49
  });
50
50
  }
@@ -100,7 +100,7 @@ class DisTubeVoice extends tiny_typed_emitter_1.TypedEmitter {
100
100
  this.channel = channel;
101
101
  }
102
102
  try {
103
- await (0, voice_1.entersState)(this.connection, voice_1.VoiceConnectionStatus.Ready, TIMEOUT);
103
+ await (0, __1.entersState)(this.connection, voice_1.VoiceConnectionStatus.Ready, TIMEOUT);
104
104
  }
105
105
  catch {
106
106
  if (this.connection.state.status !== voice_1.VoiceConnectionStatus.Destroyed) {
@@ -118,18 +118,13 @@ class DisTubeVoice extends tiny_typed_emitter_1.TypedEmitter {
118
118
  * @param {Error} [error] Optional, an error to emit with 'error' event.
119
119
  */
120
120
  leave(error) {
121
- var _a, _b;
122
- this.stop();
121
+ this.stop(true);
123
122
  if (!this.isDisconnected) {
124
123
  this.emit("disconnect", error);
125
124
  this.isDisconnected = true;
126
125
  }
127
- (0, voice_1.entersState)(this.audioPlayer, voice_1.AudioPlayerStatus.Idle, ((_b = (_a = this.audioResource) === null || _a === void 0 ? void 0 : _a.silencePaddingFrames) !== null && _b !== void 0 ? _b : 5) * 20)
128
- .catch(() => this.stop(true))
129
- .finally(() => {
130
- if (this.connection.state.status !== voice_1.VoiceConnectionStatus.Destroyed)
131
- this.connection.destroy();
132
- });
126
+ if (this.connection.state.status !== voice_1.VoiceConnectionStatus.Destroyed)
127
+ this.connection.destroy();
133
128
  this.voices.delete(this.id);
134
129
  }
135
130
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"DisTubeVoice.js","sourceRoot":"","sources":["../../../src/core/voice/DisTubeVoice.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAClD,6BAAsF;AACtF,4CAQ0B;AAK1B;;GAEG;AACH,MAAa,YAAa,SA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AC;IACD,OAAO;QACL,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IACD;;;OAGG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC;IAC7C,CAAC;IACD;;;OAGG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC;IAC7C,CAAC;IACD;;;;OAIG;IACH,WAAW,CAAC,QAAiB;QAC3B,IAAI,OAAO,QAAQ,KAAK,SAAS,EAAE;YACjC,MAAM,IAAI,gBAAY,CAAC,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;SACzE;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAC5B,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU;YAC7B,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IACD;;;;OAIG;IACH,WAAW,CAAC,QAAiB;QAC3B,IAAI,OAAO,QAAQ,KAAK,SAAS,EAAE;YACjC,MAAM,IAAI,gBAAY,CAAC,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;SACzE;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAC5B,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU;YAC7B,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IACD;;;OAGG;IACH,IAAI,UAAU;;QACZ,OAAO,MAAA,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,0CAAE,EAAE,0CAAE,KAAK,CAAC;IACxC,CAAC;CACF;AAjOD,oCAiOC;AAED,kBAAe,YAAY,CAAC","sourcesContent":["import { TypedEmitter } from \"tiny-typed-emitter\";\nimport { DisTubeError, createDiscordJSAdapter, isSupportedVoiceChannel } from \"../..\";\nimport {\n AudioPlayerStatus,\n VoiceConnectionDisconnectReason,\n VoiceConnectionStatus,\n createAudioPlayer,\n createAudioResource,\n entersState,\n joinVoiceChannel,\n} from \"@discordjs/voice\";\nimport type { DisTubeStream, DisTubeVoiceEvents, DisTubeVoiceManager } from \"../..\";\nimport type { AudioPlayer, AudioResource, VoiceConnection } from \"@discordjs/voice\";\nimport type { Snowflake, StageChannel, VoiceChannel, VoiceState } from \"discord.js\";\n\n/**\n * Create a voice connection to the voice channel\n */\nexport class DisTubeVoice extends TypedEmitter<DisTubeVoiceEvents> {\n id: Snowflake;\n voices: DisTubeVoiceManager;\n audioPlayer: AudioPlayer;\n connection!: VoiceConnection;\n audioResource?: AudioResource;\n emittedError!: boolean;\n isDisconnected: boolean;\n private _channel!: VoiceChannel | StageChannel;\n private _volume: number;\n constructor(voiceManager: DisTubeVoiceManager, channel: VoiceChannel | StageChannel) {\n super();\n if (!isSupportedVoiceChannel(channel)) throw new DisTubeError(\"NOT_SUPPORTED_VOICE\");\n if (!channel.joinable) {\n if (channel.full) throw new DisTubeError(\"VOICE_FULL\");\n else throw new DisTubeError(\"VOICE_MISSING_PERMS\");\n }\n this.isDisconnected = false;\n this.id = channel.guild.id;\n this.channel = channel;\n /**\n * The voice manager that instantiated this connection\n * @type {DisTubeVoiceManager}\n */\n this.voices = voiceManager;\n this.voices.add(this.id, this);\n this._volume = 0.5;\n this.audioPlayer = createAudioPlayer()\n .on(AudioPlayerStatus.Idle, oldState => {\n if (oldState.status !== AudioPlayerStatus.Idle) {\n delete this.audioResource;\n this.emit(\"finish\");\n }\n })\n .on(\"error\", error => {\n if (this.emittedError) return;\n this.emittedError = true;\n this.emit(\"error\", error);\n });\n this.connection\n .on(VoiceConnectionStatus.Disconnected, (_, newState) => {\n if (newState.reason === VoiceConnectionDisconnectReason.WebSocketClose && newState.closeCode === 4014) {\n entersState(this.connection, VoiceConnectionStatus.Connecting, 5e3).catch(() => {\n this.leave();\n });\n } else if (this.connection.rejoinAttempts < 5) {\n setTimeout(() => {\n this.connection.rejoin();\n }, (this.connection.rejoinAttempts + 1) * 5e3).unref();\n } else if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {\n this.leave(new DisTubeError(\"VOICE_RECONNECT_FAILED\"));\n }\n })\n .on(VoiceConnectionStatus.Destroyed, () => {\n this.leave();\n })\n // eslint-disable-next-line no-console\n .on(\"error\", console.warn);\n this.connection.subscribe(this.audioPlayer);\n /**\n * Get or set the volume percentage\n * @name DisTubeVoice#volume\n * @type {number}\n */\n }\n get channel() {\n return this._channel;\n }\n set channel(channel: VoiceChannel | StageChannel) {\n if (!isSupportedVoiceChannel(channel)) throw new DisTubeError(\"NOT_SUPPORTED_VOICE\");\n if (channel.guild.id !== this.id) throw new DisTubeError(\"VOICE_CHANGE_GUILD\");\n this.connection = this._join(channel);\n this._channel = channel;\n }\n private _join(channel: VoiceChannel | StageChannel) {\n return joinVoiceChannel({\n channelId: channel.id,\n guildId: this.id,\n adapterCreator: (channel.guild.voiceAdapterCreator as any) || createDiscordJSAdapter(channel as any),\n });\n }\n /**\n * Join a voice channel with this connection\n * @param {Discord.VoiceChannel|Discord.StageChannel} [channel] A voice channel\n * @private\n * @returns {Promise<DisTubeVoice>}\n */\n async join(channel?: VoiceChannel | StageChannel): Promise<DisTubeVoice> {\n const TIMEOUT = 30e3;\n if (channel) {\n this.channel = channel;\n }\n try {\n await entersState(this.connection, VoiceConnectionStatus.Ready, TIMEOUT);\n } catch {\n if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {\n this.connection.destroy();\n }\n this.voices.delete(this.id);\n if ((this.voiceState as any)?.connection) throw new DisTubeError(\"VOICE_DEPRECATED_CONNECTION\");\n throw new DisTubeError(\"VOICE_CONNECT_FAILED\", TIMEOUT / 1e3);\n }\n return this;\n }\n /**\n * Leave the voice channel of this connection\n * @param {Error} [error] Optional, an error to emit with 'error' event.\n */\n leave(error?: Error) {\n this.stop();\n if (!this.isDisconnected) {\n this.emit(\"disconnect\", error);\n this.isDisconnected = true;\n }\n entersState(this.audioPlayer, AudioPlayerStatus.Idle, (this.audioResource?.silencePaddingFrames ?? 5) * 20)\n .catch(() => this.stop(true))\n .finally(() => {\n if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) this.connection.destroy();\n });\n this.voices.delete(this.id);\n }\n /**\n * Stop the playing stream\n * @param {boolean} [force=false] If true, will force the {@link DisTubeVoice#audioPlayer} to enter the Idle state\n * even if the {@link DisTubeVoice#audioResource} has silence padding frames.\n * @private\n */\n stop(force = false) {\n this.audioPlayer.stop(force);\n }\n /**\n * Play a readable stream\n * @private\n * @param {DisTubeStream} stream Readable stream\n */\n play(stream: DisTubeStream) {\n this.emittedError = false;\n stream.stream.on(\"error\", (error: NodeJS.ErrnoException) => {\n if (this.emittedError || error.code === \"ERR_STREAM_PREMATURE_CLOSE\") return;\n this.emittedError = true;\n this.emit(\"error\", error);\n });\n this.audioResource = createAudioResource(stream.stream, {\n inputType: stream.type,\n inlineVolume: true,\n });\n // eslint-disable-next-line no-self-assign\n this.volume = this.volume;\n this.audioPlayer.play(this.audioResource);\n }\n set volume(volume: number) {\n if (typeof volume !== \"number\" || isNaN(volume)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"number\", volume, \"volume\");\n }\n if (volume < 0) {\n throw new DisTubeError(\"NUMBER_COMPARE\", \"Volume\", \"bigger or equal to\", 0);\n }\n this._volume = volume / 100;\n this.audioResource?.volume?.setVolume(Math.pow(this._volume, 0.5 / Math.log10(2)));\n }\n get volume() {\n return this._volume * 100;\n }\n /**\n * Playback duration of the audio resource in seconds\n * @type {number}\n */\n get playbackDuration() {\n return (this.audioResource?.playbackDuration || 0) / 1000;\n }\n pause() {\n this.audioPlayer.pause();\n }\n unpause() {\n this.audioPlayer.unpause();\n }\n /**\n * Whether the bot is self-deafened\n * @type {boolean}\n */\n get selfDeaf(): boolean {\n return this.connection.joinConfig.selfDeaf;\n }\n /**\n * Whether the bot is self-muted\n * @type {boolean}\n */\n get selfMute(): boolean {\n return this.connection.joinConfig.selfMute;\n }\n /**\n * Self-deafens/undeafens the bot.\n * @param {boolean} selfDeaf Whether or not the bot should be self-deafened\n * @returns {boolean} true if the voice state was successfully updated, otherwise false\n */\n setSelfDeaf(selfDeaf: boolean): boolean {\n if (typeof selfDeaf !== \"boolean\") {\n throw new DisTubeError(\"INVALID_TYPE\", \"boolean\", selfDeaf, \"selfDeaf\");\n }\n return this.connection.rejoin({\n ...this.connection.joinConfig,\n selfDeaf,\n });\n }\n /**\n * Self-mutes/unmutes the bot.\n * @param {boolean} selfMute Whether or not the bot should be self-muted\n * @returns {boolean} true if the voice state was successfully updated, otherwise false\n */\n setSelfMute(selfMute: boolean): boolean {\n if (typeof selfMute !== \"boolean\") {\n throw new DisTubeError(\"INVALID_TYPE\", \"boolean\", selfMute, \"selfMute\");\n }\n return this.connection.rejoin({\n ...this.connection.joinConfig,\n selfMute,\n });\n }\n /**\n * The voice state of this connection\n * @type {Discord.VoiceState?}\n */\n get voiceState(): VoiceState | undefined {\n return this.channel?.guild?.me?.voice;\n }\n}\n\nexport default DisTubeVoice;\n"]}
1
+ {"version":3,"file":"DisTubeVoice.js","sourceRoot":"","sources":["../../../src/core/voice/DisTubeVoice.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAClD,6BAAmG;AACnG,4CAO0B;AAK1B;;GAEG;AACH,MAAa,YAAa,SAAQ,iCAAgC;IAUhE,YAAY,YAAiC,EAAE,OAAoC;QACjF,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAA,2BAAuB,EAAC,OAAO,CAAC;YAAE,MAAM,IAAI,gBAAY,CAAC,qBAAqB,CAAC,CAAC;QACrF,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;YACrB,IAAI,OAAO,CAAC,IAAI;gBAAE,MAAM,IAAI,gBAAY,CAAC,YAAY,CAAC,CAAC;;gBAClD,MAAM,IAAI,gBAAY,CAAC,qBAAqB,CAAC,CAAC;SACpD;QACD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,K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AAQ,EAAE,UAAU,CAAC,CAAC;SACzE;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAC5B,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU;YAC7B,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IACD;;;OAGG;IACH,IAAI,UAAU;;QACZ,OAAO,MAAA,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,0CAAE,EAAE,0CAAE,KAAK,CAAC;IACxC,CAAC;CACF;AA7ND,oCA6NC;AAED,kBAAe,YAAY,CAAC","sourcesContent":["import { TypedEmitter } from \"tiny-typed-emitter\";\nimport { DisTubeError, createDiscordJSAdapter, entersState, isSupportedVoiceChannel } from \"../..\";\nimport {\n AudioPlayerStatus,\n VoiceConnectionDisconnectReason,\n VoiceConnectionStatus,\n createAudioPlayer,\n createAudioResource,\n joinVoiceChannel,\n} from \"@discordjs/voice\";\nimport type { DisTubeStream, DisTubeVoiceEvents, DisTubeVoiceManager } from \"../..\";\nimport type { AudioPlayer, AudioResource, VoiceConnection } from \"@discordjs/voice\";\nimport type { Snowflake, StageChannel, VoiceChannel, VoiceState } from \"discord.js\";\n\n/**\n * Create a voice connection to the voice channel\n */\nexport class DisTubeVoice extends TypedEmitter<DisTubeVoiceEvents> {\n id: Snowflake;\n voices: DisTubeVoiceManager;\n audioPlayer: AudioPlayer;\n connection!: VoiceConnection;\n audioResource?: AudioResource;\n emittedError!: boolean;\n isDisconnected: boolean;\n private _channel!: VoiceChannel | StageChannel;\n private _volume: number;\n constructor(voiceManager: DisTubeVoiceManager, channel: VoiceChannel | StageChannel) {\n super();\n if (!isSupportedVoiceChannel(channel)) throw new DisTubeError(\"NOT_SUPPORTED_VOICE\");\n if (!channel.joinable) {\n if (channel.full) throw new DisTubeError(\"VOICE_FULL\");\n else throw new DisTubeError(\"VOICE_MISSING_PERMS\");\n }\n this.isDisconnected = false;\n this.id = channel.guild.id;\n this.channel = channel;\n /**\n * The voice manager that instantiated this connection\n * @type {DisTubeVoiceManager}\n */\n this.voices = voiceManager;\n this.voices.add(this.id, this);\n this._volume = 0.5;\n this.audioPlayer = createAudioPlayer()\n .on(AudioPlayerStatus.Idle, oldState => {\n if (oldState.status !== AudioPlayerStatus.Idle) {\n delete this.audioResource;\n this.emit(\"finish\");\n }\n })\n .on(\"error\", error => {\n if (this.emittedError) return;\n this.emittedError = true;\n this.emit(\"error\", error);\n });\n this.connection\n .on(VoiceConnectionStatus.Disconnected, (_, newState) => {\n if (newState.reason === VoiceConnectionDisconnectReason.WebSocketClose && newState.closeCode === 4014) {\n entersState(this.connection, VoiceConnectionStatus.Connecting, 5e3).catch(() => {\n this.leave();\n });\n } else if (this.connection.rejoinAttempts < 5) {\n setTimeout(() => {\n this.connection.rejoin();\n }, (this.connection.rejoinAttempts + 1) * 5e3).unref();\n } else if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {\n this.leave(new DisTubeError(\"VOICE_RECONNECT_FAILED\"));\n }\n })\n .on(VoiceConnectionStatus.Destroyed, () => {\n this.leave();\n })\n // eslint-disable-next-line no-console\n .on(\"error\", console.warn);\n this.connection.subscribe(this.audioPlayer);\n /**\n * Get or set the volume percentage\n * @name DisTubeVoice#volume\n * @type {number}\n */\n }\n get channel() {\n return this._channel;\n }\n set channel(channel: VoiceChannel | StageChannel) {\n if (!isSupportedVoiceChannel(channel)) throw new DisTubeError(\"NOT_SUPPORTED_VOICE\");\n if (channel.guild.id !== this.id) throw new DisTubeError(\"VOICE_CHANGE_GUILD\");\n this.connection = this._join(channel);\n this._channel = channel;\n }\n private _join(channel: VoiceChannel | StageChannel) {\n return joinVoiceChannel({\n channelId: channel.id,\n guildId: this.id,\n adapterCreator: (channel.guild.voiceAdapterCreator as any) || createDiscordJSAdapter(channel as any),\n });\n }\n /**\n * Join a voice channel with this connection\n * @param {Discord.VoiceChannel|Discord.StageChannel} [channel] A voice channel\n * @private\n * @returns {Promise<DisTubeVoice>}\n */\n async join(channel?: VoiceChannel | StageChannel): Promise<DisTubeVoice> {\n const TIMEOUT = 30e3;\n if (channel) {\n this.channel = channel;\n }\n try {\n await entersState(this.connection, VoiceConnectionStatus.Ready, TIMEOUT);\n } catch {\n if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {\n this.connection.destroy();\n }\n this.voices.delete(this.id);\n if ((this.voiceState as any)?.connection) throw new DisTubeError(\"VOICE_DEPRECATED_CONNECTION\");\n throw new DisTubeError(\"VOICE_CONNECT_FAILED\", TIMEOUT / 1e3);\n }\n return this;\n }\n /**\n * Leave the voice channel of this connection\n * @param {Error} [error] Optional, an error to emit with 'error' event.\n */\n leave(error?: Error) {\n this.stop(true);\n if (!this.isDisconnected) {\n this.emit(\"disconnect\", error);\n this.isDisconnected = true;\n }\n if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) this.connection.destroy();\n this.voices.delete(this.id);\n }\n /**\n * Stop the playing stream\n * @param {boolean} [force=false] If true, will force the {@link DisTubeVoice#audioPlayer} to enter the Idle state\n * even if the {@link DisTubeVoice#audioResource} has silence padding frames.\n * @private\n */\n stop(force = false) {\n this.audioPlayer.stop(force);\n }\n /**\n * Play a readable stream\n * @private\n * @param {DisTubeStream} stream Readable stream\n */\n play(stream: DisTubeStream) {\n this.emittedError = false;\n stream.stream.on(\"error\", (error: NodeJS.ErrnoException) => {\n if (this.emittedError || error.code === \"ERR_STREAM_PREMATURE_CLOSE\") return;\n this.emittedError = true;\n this.emit(\"error\", error);\n });\n this.audioResource = createAudioResource(stream.stream, {\n inputType: stream.type,\n inlineVolume: true,\n });\n // eslint-disable-next-line no-self-assign\n this.volume = this.volume;\n this.audioPlayer.play(this.audioResource);\n }\n set volume(volume: number) {\n if (typeof volume !== \"number\" || isNaN(volume)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"number\", volume, \"volume\");\n }\n if (volume < 0) {\n throw new DisTubeError(\"NUMBER_COMPARE\", \"Volume\", \"bigger or equal to\", 0);\n }\n this._volume = volume / 100;\n this.audioResource?.volume?.setVolume(Math.pow(this._volume, 0.5 / Math.log10(2)));\n }\n get volume() {\n return this._volume * 100;\n }\n /**\n * Playback duration of the audio resource in seconds\n * @type {number}\n */\n get playbackDuration() {\n return (this.audioResource?.playbackDuration || 0) / 1000;\n }\n pause() {\n this.audioPlayer.pause();\n }\n unpause() {\n this.audioPlayer.unpause();\n }\n /**\n * Whether the bot is self-deafened\n * @type {boolean}\n */\n get selfDeaf(): boolean {\n return this.connection.joinConfig.selfDeaf;\n }\n /**\n * Whether the bot is self-muted\n * @type {boolean}\n */\n get selfMute(): boolean {\n return this.connection.joinConfig.selfMute;\n }\n /**\n * Self-deafens/undeafens the bot.\n * @param {boolean} selfDeaf Whether or not the bot should be self-deafened\n * @returns {boolean} true if the voice state was successfully updated, otherwise false\n */\n setSelfDeaf(selfDeaf: boolean): boolean {\n if (typeof selfDeaf !== \"boolean\") {\n throw new DisTubeError(\"INVALID_TYPE\", \"boolean\", selfDeaf, \"selfDeaf\");\n }\n return this.connection.rejoin({\n ...this.connection.joinConfig,\n selfDeaf,\n });\n }\n /**\n * Self-mutes/unmutes the bot.\n * @param {boolean} selfMute Whether or not the bot should be self-muted\n * @returns {boolean} true if the voice state was successfully updated, otherwise false\n */\n setSelfMute(selfMute: boolean): boolean {\n if (typeof selfMute !== \"boolean\") {\n throw new DisTubeError(\"INVALID_TYPE\", \"boolean\", selfMute, \"selfMute\");\n }\n return this.connection.rejoin({\n ...this.connection.joinConfig,\n selfMute,\n });\n }\n /**\n * The voice state of this connection\n * @type {Discord.VoiceState?}\n */\n get voiceState(): VoiceState | undefined {\n return this.channel?.guild?.me?.voice;\n }\n}\n\nexport default DisTubeVoice;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DisTubeError.d.ts","sourceRoot":"","sources":["../../src/struct/DisTubeError.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc;6BACO,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,OAAO,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AI5D,MAAM,YAAY,MAAM,SAAS,MAAM;wBAC1C,MAAM;iCACG,MAAM,QAAQ,MAAM;uBAC9B,MAAM,OAAO,MAAM;yBACjB,MAAM;yBAEN,MAAM;yBACN,MAAM;wBACP,MAAM;;;;8BAKA,MAAM;;;;;;;;;;;;;;;;;;;;;6BAyBP,MAAM;;;;CAMhC,CAAC;AAEF,aAAK,aAAa,GAAG,OAAO,cAAc,CAAC;AAC3C,aAAK,UAAU,GAAG,MAAM,aAAa,CAAC;AACtC,aAAK,SAAS,GAAG;KAAG,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,GAAG,KAAK;CAAE,CAAC,UAAU,CAAC,CAAC;AAClG,aAAK,iBAAiB,GAAG,OAAO,CAAC,MAAM,OAAO,cAAc,EAAE,SAAS,CAAC,CAAC;AAMzE,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,KAAK;IACvD,SAAS,EAAE,MAAM,CAAC;gBACN,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,CAAC,SAAS,iBAAiB,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,CAAC;gBAC9F,IAAI,EAAE,iBAAiB,EAAE,CAAC,EAAE,KAAK;gBACjC,IAAI,EAAE,CAAC,SAAS,UAAU,GAAG,6BAA6B,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM;IAS3F,IAAI,IAAI,WAEP;IAED,IAAI,IAAI,WAEP;CACF;AAED,eAAe,YAAY,CAAC"}
@@ -3,14 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DisTubeError = void 0;
4
4
  const ERROR_MESSAGES = {
5
5
  INVALID_TYPE: (expected, got, name) => {
6
- var _a;
7
- return `Expected ${Array.isArray(expected) ? expected.map(e => (typeof e === "number" ? e : `'${e}'`)).join(" or ") : `'${expected}'`}${name ? ` for '${name}'` : ""}, but got ${typeof got === "string"
8
- ? `'${got}'`
9
- : typeof got === "number"
10
- ? got
11
- : Array.isArray(got)
12
- ? `Array<${got.length}>`
13
- : ((_a = got === null || got === void 0 ? void 0 : got.constructor) === null || _a === void 0 ? void 0 : _a.name) || typeof got} (${typeof got})`;
6
+ var _a, _b;
7
+ return `Expected ${Array.isArray(expected) ? expected.map(e => (typeof e === "number" ? e : `'${e}'`)).join(" or ") : `'${expected}'`}${name ? ` for '${name}'` : ""}, but got ${JSON.stringify(got)} (${(_b = (_a = got === null || got === void 0 ? void 0 : got.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : typeof got})`;
14
8
  },
15
9
  NUMBER_COMPARE: (name, expected, value) => `'${name}' must be ${expected} ${value}`,
16
10
  EMPTY_ARRAY: (name) => `'${name}' is an empty array`,
@@ -1 +1 @@
1
- {"version":3,"file":"DisTubeError.js","sourceRoot":"","sources":["../../src/struct/DisTubeError.ts"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAAG;IACrB,YAAY,EAAE,CAAC,QAA0D,EAAE,GAAQ,EAAE,IAAa,EAAE,EAAE;;QACpG,OAAA,YACE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,GACjH,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,aAC7B,OAAO,GAAG,KAAK,QAAQ;YACrB,CAAC,CAAC,IAAI,GAAG,GAAG;YACZ,CAAC,CAAC,OAAO,GAAG,KAAK,QAAQ;gBACzB,CAAC,CAAC,GAAG;g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E,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,IAAI;QACN,OAAO,iBAAiB,IAAI,CAAC,SAAS,GAAG,CAAC;IAC5C,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF;AArBD,oCAqBC;AAED,kBAAe,YAAY,CAAC","sourcesContent":["const ERROR_MESSAGES = {\n INVALID_TYPE: (expected: (number | string) | readonly (number | string)[], got: any, name?: string) =>\n `Expected ${\n Array.isArray(expected) ? expected.map(e => (typeof e === \"number\" ? e : `'${e}'`)).join(\" or \") : `'${expected}'`\n }${name ? ` for '${name}'` : \"\"}, but got ${\n typeof got === \"string\"\n ? `'${got}'`\n : typeof got === \"number\"\n ? got\n : Array.isArray(got)\n ? `Array<${got.length}>`\n : got?.constructor?.name || typeof got\n } (${typeof got})`,\n NUMBER_COMPARE: (name: string, expected: string, value: number) => `'${name}' must be ${expected} ${value}`,\n EMPTY_ARRAY: (name: string) => `'${name}' is an empty array`,\n EMPTY_FILTERED_ARRAY: (name: string, type: string) => `There is no valid '${type}' in the '${name}' array`,\n INVALID_KEY: (obj: string, key: string) => `'${key}' does not need to be provided in ${obj}`,\n EMPTY_STRING: (name: string) => `'${name}' string must not be empty`,\n\n MISSING_INTENTS: (i: string) => `${i} intent must be provided for the Client`,\n DISABLED_OPTION: (o: string) => `DisTubeOptions.${o} is disabled`,\n ENABLED_OPTION: (o: string) => `DisTubeOptions.${o} is enabled`,\n\n NOT_IN_VOICE: \"User is not in any voice channel\",\n NOT_SUPPORTED_VOICE: \"DisTubeVoice only supports VoiceChannel or a StageChannel\",\n VOICE_FULL: \"The voice channel is full\",\n VOICE_CONNECT_FAILED: (s: number) => `Cannot connect to the voice channel after ${s} seconds`,\n VOICE_MISSING_PERMS: \"You do not have permission to join this voice channel\",\n VOICE_RECONNECT_FAILED: \"Cannot reconnect to the voice channel\",\n VOICE_CHANGE_GUILD: \"Cannot join a channel in a different guild\",\n VOICE_DEPRECATED_CONNECTION:\n \"Cannot connect to the voice channel due to a deprecated connection is created.\\n\" +\n \"Read more: https://distube.js.org/guide/additional-info/update.html#voice\",\n\n NO_QUEUE: \"There is no playing queue in this guild\",\n QUEUE_EXIST: \"This guild has a Queue already\",\n ADD_BEFORE_PLAYING: \"Cannot add Song before the playing Song\",\n PAUSED: \"The queue has been paused already\",\n RESUMED: \"The queue has been playing already\",\n NO_PREVIOUS: \"There is no previous song in this queue\",\n NO_UP_NEXT: \"There is no up next song\",\n NO_SONG_POSITION: \"Does not have any song at this position\",\n NO_PLAYING: \"There is no playing song in the queue\",\n\n NO_RESULT: \"No result found\",\n NO_RELATED: \"Cannot find any related songs\",\n CANNOT_PLAY_RELATED: \"Cannot play the related song\",\n UNAVAILABLE_VIDEO: \"This video is unavailable\",\n UNPLAYABLE_FORMATS: \"No playable format found\",\n NON_NSFW: \"Cannot play age-restricted content in non-NSFW channel\",\n NOT_SUPPORTED_URL: \"This url is not supported\",\n CANNOT_RESOLVE_SONG: (t: string) => `Cannot resolve ${t} to a Song`,\n NO_VALID_SONG: \"'songs' array does not have any valid Song, SearchResult or url\",\n EMPTY_FILTERED_PLAYLIST:\n \"There is no valid video in the playlist\\n\" +\n \"Maybe age-restricted contents is filtered because you are in non-NSFW channel\",\n EMPTY_PLAYLIST: \"There is no valid video in the playlist\",\n};\n\ntype ErrorMessages = typeof ERROR_MESSAGES;\ntype ErrorCodes = keyof ErrorMessages;\ntype ErrorCode = { [K in ErrorCodes]-?: ErrorMessages[K] extends string ? K : never }[ErrorCodes];\ntype ErrorCodeTemplate = Exclude<keyof typeof ERROR_MESSAGES, ErrorCode>;\n\nconst errMsg = (msg: string | ((...x: any) => string), ...args: any) => (typeof msg === \"string\" ? msg : msg(...args));\n\nconst haveCode = (code: string): code is ErrorCodes => Object.keys(ERROR_MESSAGES).includes(code);\n\nexport class DisTubeError<T extends string> extends Error {\n errorCode: string;\n constructor(code: ErrorCode);\n constructor(code: T extends ErrorCodeTemplate ? T : never, ...args: Parameters<ErrorMessages[typeof code]>);\n constructor(code: ErrorCodeTemplate, _: never);\n constructor(code: T extends ErrorCodes ? \"This is built-in error code\" : T, message: string);\n constructor(code: string, ...args: any) {\n if (haveCode(code)) super(errMsg(ERROR_MESSAGES[code], ...args));\n else super(...args);\n\n this.errorCode = code;\n if (Error.captureStackTrace) Error.captureStackTrace(this, DisTubeError);\n }\n\n get name() {\n return `DisTubeError [${this.errorCode}]`;\n }\n\n get code() {\n return this.errorCode;\n }\n}\n\nexport default DisTubeError;\n"]}
1
+ {"version":3,"file":"DisTubeError.js","sourceRoot":"","sources":["../../src/struct/DisTubeError.ts"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAAG;IACrB,YAAY,EAAE,CAAC,QAA0D,EAAE,GAAQ,EAAE,IAAa,EAAE,EAAE;;QACpG,OAAA,YACE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,GACjH,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,aAAa,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,MAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW,0CAAE,IAAI,mCAAI,OAAO,GAAG,GAAG,CAAA;KAAA;IAC7G,cAAc,EAAE,CAAC,IAAY,EAAE,QAAgB,EAAE,KAAa,EAAE,EAAE,CAAC,IAAI,IAAI,aAAa,QAAQ,IAAI,KAAK,EAAE;IAC3G,WAAW,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,I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9C,mBAAmB,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,YAAY;IACnE,aAAa,EAAE,iEAAiE;IAChF,uBAAuB,EACrB,2CAA2C;QAC3C,+EAA+E;IACjF,cAAc,EAAE,yCAAyC;CAC1D,CAAC;AAOF,MAAM,MAAM,GAAG,CAAC,GAAqC,EAAE,GAAG,IAAS,EAAE,EAAE,CAAC,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AAEvH,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAsB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAElG,MAAa,YAA+B,SAAQ,KAAK;IAMvD,YAAY,IAAY,EAAE,GAAG,IAAS;QACpC,IAAI,QAAQ,CAAC,IAAI,CAAC;YAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;;YAC5D,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QAEpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,KAAK,CAAC,iBAAiB;YAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,IAAI;QACN,OAAO,iBAAiB,IAAI,CAAC,SAAS,GAAG,CAAC;IAC5C,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF;AArBD,oCAqBC;AAED,kBAAe,YAAY,CAAC","sourcesContent":["const ERROR_MESSAGES = {\n INVALID_TYPE: (expected: (number | string) | readonly (number | string)[], got: any, name?: string) =>\n `Expected ${\n Array.isArray(expected) ? expected.map(e => (typeof e === \"number\" ? e : `'${e}'`)).join(\" or \") : `'${expected}'`\n }${name ? ` for '${name}'` : \"\"}, but got ${JSON.stringify(got)} (${got?.constructor?.name ?? typeof got})`,\n NUMBER_COMPARE: (name: string, expected: string, value: number) => `'${name}' must be ${expected} ${value}`,\n EMPTY_ARRAY: (name: string) => `'${name}' is an empty array`,\n EMPTY_FILTERED_ARRAY: (name: string, type: string) => `There is no valid '${type}' in the '${name}' array`,\n INVALID_KEY: (obj: string, key: string) => `'${key}' does not need to be provided in ${obj}`,\n EMPTY_STRING: (name: string) => `'${name}' string must not be empty`,\n\n MISSING_INTENTS: (i: string) => `${i} intent must be provided for the Client`,\n DISABLED_OPTION: (o: string) => `DisTubeOptions.${o} is disabled`,\n ENABLED_OPTION: (o: string) => `DisTubeOptions.${o} is enabled`,\n\n NOT_IN_VOICE: \"User is not in any voice channel\",\n NOT_SUPPORTED_VOICE: \"DisTubeVoice only supports VoiceChannel or a StageChannel\",\n VOICE_FULL: \"The voice channel is full\",\n VOICE_CONNECT_FAILED: (s: number) => `Cannot connect to the voice channel after ${s} seconds`,\n VOICE_MISSING_PERMS: \"You do not have permission to join this voice channel\",\n VOICE_RECONNECT_FAILED: \"Cannot reconnect to the voice channel\",\n VOICE_CHANGE_GUILD: \"Cannot join a channel in a different guild\",\n VOICE_DEPRECATED_CONNECTION:\n \"Cannot connect to the voice channel due to a deprecated connection is created.\\n\" +\n \"Read more: https://distube.js.org/guide/additional-info/update.html#voice\",\n\n NO_QUEUE: \"There is no playing queue in this guild\",\n QUEUE_EXIST: \"This guild has a Queue already\",\n ADD_BEFORE_PLAYING: \"Cannot add Song before the playing Song\",\n PAUSED: \"The queue has been paused already\",\n RESUMED: \"The queue has been playing already\",\n NO_PREVIOUS: \"There is no previous song in this queue\",\n NO_UP_NEXT: \"There is no up next song\",\n NO_SONG_POSITION: \"Does not have any song at this position\",\n NO_PLAYING: \"There is no playing song in the queue\",\n\n NO_RESULT: \"No result found\",\n NO_RELATED: \"Cannot find any related songs\",\n CANNOT_PLAY_RELATED: \"Cannot play the related song\",\n UNAVAILABLE_VIDEO: \"This video is unavailable\",\n UNPLAYABLE_FORMATS: \"No playable format found\",\n NON_NSFW: \"Cannot play age-restricted content in non-NSFW channel\",\n NOT_SUPPORTED_URL: \"This url is not supported\",\n CANNOT_RESOLVE_SONG: (t: string) => `Cannot resolve ${t} to a Song`,\n NO_VALID_SONG: \"'songs' array does not have any valid Song, SearchResult or url\",\n EMPTY_FILTERED_PLAYLIST:\n \"There is no valid video in the playlist\\n\" +\n \"Maybe age-restricted contents is filtered because you are in non-NSFW channel\",\n EMPTY_PLAYLIST: \"There is no valid video in the playlist\",\n};\n\ntype ErrorMessages = typeof ERROR_MESSAGES;\ntype ErrorCodes = keyof ErrorMessages;\ntype ErrorCode = { [K in ErrorCodes]-?: ErrorMessages[K] extends string ? K : never }[ErrorCodes];\ntype ErrorCodeTemplate = Exclude<keyof typeof ERROR_MESSAGES, ErrorCode>;\n\nconst errMsg = (msg: string | ((...x: any) => string), ...args: any) => (typeof msg === \"string\" ? msg : msg(...args));\n\nconst haveCode = (code: string): code is ErrorCodes => Object.keys(ERROR_MESSAGES).includes(code);\n\nexport class DisTubeError<T extends string> extends Error {\n errorCode: string;\n constructor(code: ErrorCode);\n constructor(code: T extends ErrorCodeTemplate ? T : never, ...args: Parameters<ErrorMessages[typeof code]>);\n constructor(code: ErrorCodeTemplate, _: never);\n constructor(code: T extends ErrorCodes ? \"This is built-in error code\" : T, message: string);\n constructor(code: string, ...args: any) {\n if (haveCode(code)) super(errMsg(ERROR_MESSAGES[code], ...args));\n else super(...args);\n\n this.errorCode = code;\n if (Error.captureStackTrace) Error.captureStackTrace(this, DisTubeError);\n }\n\n get name() {\n return `DisTubeError [${this.errorCode}]`;\n }\n\n get code() {\n return this.errorCode;\n }\n}\n\nexport default DisTubeError;\n"]}
@@ -113,7 +113,7 @@ export declare class Queue extends DisTubeBase {
113
113
  * The voice channel playing in.
114
114
  * @type {Discord.VoiceChannel|Discord.StageChannel|null}
115
115
  */
116
- get voiceChannel(): import("discord.js").VoiceChannel | import("discord.js").StageChannel | null;
116
+ get voiceChannel(): import("discord.js").VoiceBasedChannel | null;
117
117
  get volume(): number;
118
118
  set volume(value: number);
119
119
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Queue.d.ts","sourceRoot":"","sources":["../../src/struct/Queue.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAgB,UAAU,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,IAAI,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAElF;;;GAGG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,IAAI,EAAE,CAAC;IACtB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC;IAC9B;;OA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C5C;;;;;OAKG;IACH,aAAa,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU;IAS5C;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,EAAE,KAAK,UAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;IAwB1E;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAOzB;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IASrC;;OAEG;IACG,IAAI;IAWV;;;;OAIG;IACH,MAAM;IAYN;;;OAGG;IACH,cAAc,IAAI,OAAO;CAI1B;AAED,eAAe,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/@distube/ytpl/typings/index.d.ts","../node_modules/@distube/ytsr/typings/index.d.ts","../node_modules/@distube/ytdl-core/typings/index.d.ts","../node_modules/ow/dist/predicates/base-predicate.d.ts","../node_modules/ow/dist/predicates/predicate.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/ow/node_modules/type-fest/source/primitive.d.ts","../node_modules/ow/node_modules/type-fest/source/typed-array.d.ts","../node_modules/ow/node_modules/type-fest/source/basic.d.ts","../node_modules/ow/node_modules/type-fest/source/observable-like.d.ts","../node_modules/ow/node_modules/type-fest/source/except.d.ts","../node_modules/ow/node_modules/type-fest/source/simplify.d.ts","../node_modules/ow/node_modules/type-fest/source/mutable.d.ts","../node_modules/ow/node_modules/type-fest/source/merge.d.ts","../node_modules/ow/node_modules/type-fest/source/merge-exclusive.d.ts","../node_modules/ow/node_modules/type-fest/source/require-at-least-one.d.ts","../node_modules/ow/node_modules/type-fest/source/require-exactly-one.d.ts","../node_modules/ow/node_modules/type-fest/source/partial-deep.d.ts","../node_modules/ow/node_modules/type-fest/source/readonly-deep.d.ts","../node_modules/ow/node_modules/type-fest/source/literal-union.d.ts","../node_modules/ow/node_modules/type-fest/source/promisable.d.ts","../node_modules/ow/node_modules/type-fest/source/opaque.d.ts","../node_modules/ow/node_modules/type-fest/source/set-optional.d.ts","../node_modules/ow/node_modules/type-fest/source/set-required.d.ts","../node_modules/ow/node_modules/type-fest/source/value-of.d.ts","../node_modules/ow/node_modules/type-fest/source/promise-value.d.ts","../node_modules/ow/node_modules/type-fest/source/async-return-type.d.ts","../node_modules/ow/node_modules/type-fest/source/conditional-keys.d.ts","../node_modules/ow/node_modules/type-fest/source/conditional-except.d.ts","../node_modules/ow/node_modules/type-fest/source/conditional-pick.d.ts","../node_modules/ow/node_modules/type-fest/source/union-to-intersection.d.ts","../node_modules/ow/node_modules/type-fest/source/stringified.d.ts","../node_modules/ow/node_modules/type-fest/source/fixed-length-array.d.ts","../node_modules/ow/node_modules/type-fest/source/iterable-element.d.ts","../node_modules/ow/node_modules/type-fest/source/entry.d.ts","../node_modules/ow/node_modules/type-fest/source/entries.d.ts","../node_modules/ow/node_modules/type-fest/source/set-return-type.d.ts","../node_modules/ow/node_modules/type-fest/source/asyncify.d.ts","../node_modules/ow/node_modules/type-fest/source/package-json.d.ts","../node_modules/ow/node_modules/type-fest/source/tsconfig-json.d.ts","../node_modules/ow/node_modules/type-fest/base.d.ts","../node_modules/ow/node_modules/type-fest/source/utilities.d.ts","../node_modules/ow/node_modules/type-fest/ts41/utilities.d.ts","../node_modules/ow/node_modules/type-fest/ts41/camel-case.d.ts","../node_modules/ow/node_modules/type-fest/ts41/camel-cased-properties.d.ts","../node_modules/ow/node_modules/type-fest/ts41/camel-cased-properties-deep.d.ts","../node_modules/ow/node_modules/type-fest/ts41/delimiter-case.d.ts","../node_modules/ow/node_modules/type-fest/ts41/kebab-case.d.ts","../node_modules/ow/node_modules/type-fest/ts41/delimiter-cased-properties.d.ts","../node_modules/ow/node_modules/type-fest/ts41/kebab-cased-properties.d.ts","../node_modules/ow/node_modules/type-fest/ts41/delimiter-cased-properties-deep.d.ts","../node_modules/ow/node_modules/type-fest/ts41/kebab-cased-properties-deep.d.ts","../node_modules/ow/node_modules/type-fest/ts41/pascal-case.d.ts","../node_modules/ow/node_modules/type-fest/ts41/pascal-cased-properties.d.ts","../node_modules/ow/node_modules/type-fest/ts41/pascal-cased-properties-deep.d.ts","../node_modules/ow/node_modules/type-fest/ts41/snake-case.d.ts","../node_modules/ow/node_modules/type-fest/ts41/snake-cased-properties.d.ts","../node_modules/ow/node_modules/type-fest/ts41/snake-cased-properties-deep.d.ts","../node_modules/ow/node_modules/type-fest/ts41/includes.d.ts","../node_modules/ow/node_modules/type-fest/ts41/screaming-snake-case.d.ts","../node_modules/ow/node_modules/type-fest/ts41/split.d.ts","../node_modules/ow/node_modules/type-fest/ts41/trim.d.ts","../node_modules/ow/node_modules/type-fest/ts41/get.d.ts","../node_modules/ow/node_modules/type-fest/ts41/last-array-element.d.ts","../node_modules/ow/node_modules/type-fest/ts41/index.d.ts","../node_modules/ow/dist/predicates/string.d.ts","../node_modules/ow/dist/predicates/number.d.ts","../node_modules/ow/dist/predicates/bigint.d.ts","../node_modules/ow/dist/predicates/boolean.d.ts","../node_modules/ow/dist/predicates/array.d.ts","../node_modules/ow/dist/utils/match-shape.d.ts","../node_modules/ow/dist/predicates/object.d.ts","../node_modules/ow/dist/predicates/date.d.ts","../node_modules/ow/dist/predicates/error.d.ts","../node_modules/ow/dist/predicates/map.d.ts","../node_modules/ow/dist/predicates/weak-map.d.ts","../node_modules/ow/dist/predicates/set.d.ts","../node_modules/ow/dist/predicates/weak-set.d.ts","../node_modules/ow/dist/predicates/typed-array.d.ts","../node_modules/ow/dist/predicates/array-buffer.d.ts","../node_modules/ow/dist/predicates/data-view.d.ts","../node_modules/ow/dist/predicates/any.d.ts","../node_modules/ow/dist/predicates.d.ts","../node_modules/ow/dist/modifiers.d.ts","../node_modules/ow/dist/argument-error.d.ts","../node_modules/ow/dist/index.d.ts","../node_modules/discord-api-types/globals.d.ts","../node_modules/discord-api-types/payloads/v9/permissions.d.ts","../node_modules/discord-api-types/payloads/v9/emoji.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts","../node_modules/discord-api-types/payloads/v9/interactions.d.ts","../node_modules/discord-api-types/payloads/v9/sticker.d.ts","../node_modules/discord-api-types/payloads/v9/channel.d.ts","../node_modules/discord-api-types/payloads/v9/gateway.d.ts","../node_modules/discord-api-types/payloads/v9/stageInstance.d.ts","../node_modules/discord-api-types/payloads/v9/voice.d.ts","../node_modules/discord-api-types/payloads/v9/guild.d.ts","../node_modules/discord-api-types/payloads/v9/user.d.ts","../node_modules/discord-api-types/payloads/v9/teams.d.ts","../node_modules/discord-api-types/payloads/v9/application.d.ts","../node_modules/discord-api-types/payloads/v9/webhook.d.ts","../node_modules/discord-api-types/payloads/v9/auditLog.d.ts","../node_modules/discord-api-types/payloads/v9/invite.d.ts","../node_modules/discord-api-types/payloads/v9/oauth2.d.ts","../node_modules/discord-api-types/rest/common.d.ts","../node_modules/discord-api-types/rest/v9/auditLog.d.ts","../node_modules/discord-api-types/rest/v9/channel.d.ts","../node_modules/discord-api-types/rest/v9/emoji.d.ts","../node_modules/discord-api-types/rest/v9/gateway.d.ts","../node_modules/discord-api-types/utils/internals.d.ts","../node_modules/discord-api-types/rest/v9/guild.d.ts","../node_modules/discord-api-types/rest/v9/webhook.d.ts","../node_modules/discord-api-types/rest/v9/interactions.d.ts","../node_modules/discord-api-types/rest/v9/invite.d.ts","../node_modules/discord-api-types/rest/v9/oauth2.d.ts","../node_modules/discord-api-types/rest/v9/stageInstance.d.ts","../node_modules/discord-api-types/rest/v9/sticker.d.ts","../node_modules/discord-api-types/rest/v9/template.d.ts","../node_modules/discord-api-types/rest/v9/user.d.ts","../node_modules/discord-api-types/rest/v9/voice.d.ts","../node_modules/discord-api-types/rest/v9/index.d.ts","../node_modules/discord-api-types/payloads/v9/template.d.ts","../node_modules/discord-api-types/payloads/v9/index.d.ts","../node_modules/discord-api-types/gateway/common.d.ts","../node_modules/discord-api-types/gateway/v9.d.ts","../node_modules/discord-api-types/rpc/v9.d.ts","../node_modules/discord-api-types/utils/v9.d.ts","../node_modules/discord-api-types/v9.d.ts","../node_modules/@discordjs/builders/dist/index.d.ts","../node_modules/@discordjs/collection/dist/index.d.ts","../node_modules/form-data/index.d.ts","../node_modules/@types/node-fetch/externals.d.ts","../node_modules/@types/node-fetch/index.d.ts","../node_modules/@types/ws/index.d.ts","../node_modules/discord.js/typings/enums.d.ts","../node_modules/discord.js/typings/rawDataTypes.d.ts","../node_modules/discord.js/typings/index.d.ts","../src/type.ts","../src/constant.ts","../src/struct/DisTubeError.ts","../src/struct/TaskQueue.ts","../src/struct/Playlist.ts","../src/struct/SearchResult.ts","../src/struct/Song.ts","../src/core/DisTubeOptions.ts","../node_modules/prism-media/typings/opus.d.ts","../node_modules/prism-media/typings/vorbis.d.ts","../node_modules/prism-media/typings/index.d.ts","../node_modules/tiny-typed-emitter/lib/index.d.ts","../node_modules/@discordjs/voice/dist/index.d.ts","../src/core/voice/DJSAdapter.ts","../src/core/voice/DisTubeVoice.ts","../src/core/DisTubeBase.ts","../src/core/manager/BaseManager.ts","../src/core/manager/QueueManager.ts","../src/core/manager/index.ts","../src/core/voice/DisTubeVoiceManager.ts","../src/core/voice/index.ts","../src/core/DisTubeStream.ts","../src/core/DisTubeHandler.ts","../src/core/index.ts","../src/struct/Queue.ts","../src/struct/Plugin.ts","../src/struct/CustomPlugin.ts","../src/struct/ExtractorPlugin.ts","../src/struct/index.ts","../src/plugin/http.ts","../src/plugin/https.ts","../node_modules/execa/index.d.ts","../node_modules/@distube/youtube-dl/src/index.d.ts","../src/plugin/youtube-dl.ts","../src/plugin/index.ts","../src/index.ts","../src/util.ts","../src/DisTube.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/@types/keyv/index.d.ts","../node_modules/@types/http-cache-semantics/index.d.ts","../node_modules/@types/responselike/index.d.ts","../node_modules/@types/cacheable-request/index.d.ts","../node_modules/@types/graceful-fs/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/jest-diff/build/cleanupSemantic.d.ts","../node_modules/jest-diff/build/types.d.ts","../node_modules/jest-diff/build/diffLines.d.ts","../node_modules/jest-diff/build/printDiffs.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/pretty-format/build/types.d.ts","../node_modules/pretty-format/build/index.d.ts","../node_modules/@types/jest/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/minimist/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/parse-json/index.d.ts","../node_modules/@types/prettier/index.d.ts","../node_modules/@types/stack-utils/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"b09ed0465e2c4244a8225c322941182fbd64101dac77c76ea96ffb3797364937","6d6b07e437b620687741ea220c757e794bf218caf4251315b3e56e2e362370e1","4045e7e1708461cebbe1f34edd75fd8d9ce85ec4183dffe9dc4e7fbeca352465","7664bc39c9085e161f5f6f8f647ceffe26418a98a3f2a4c381fdc755be4b9e64","2cfbeb3885b75d97160fee31a23f4e5d1508cb2af1ce34ad98741b38a4b253b9","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"9acfe4d1ff027015151ce81d60797b04b52bffe97ad8310bb0ec2e8fd61e1303","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","ad4b60488fb1e562bf375dac9299815f7028bf667d9b5887b2d01d501b7d1ddd","246341c3a7a2638cf830d690e69de1e6085a102c6a30596435b050e6ac86c11a","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"6dfd135b38ab97c536d9c966fc5a5a879a19c6ed75c2c9633902be1ef0945ff7","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","a361a26932d73497a174a6d48c53cfedb55f735f20e8638fdf7b25cdeaac9ca4","b287b810b5035d5685f1df6e1e418f1ca452a3ed4f59fd5cc081dbf2045f0d9b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"902cd98bf46e95caf4118a0733fb801e9e90eec3edaed6abdad77124afec9ca2","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","cd4854d38f4eb5592afd98ab95ca17389a7dfe38013d9079e802d739bdbcc939","94eed4cc2f5f658d5e229ff1ccd38860bddf4233e347bf78edd2154dee1f2b99",{"version":"e51bee3200733b1f58818b5a9ea90fcd61c5b8afa3a0378391991f3696826a65","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","d7838022c7dab596357a9604b9c6adffe37dc34085ce0779c958ce9545bd7139","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"a279435e7813d1f061c0cab6ab77b1b9377e8d96851e5ed4a76a1ce6eb6e628f","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4","d88ecca73348e7c337541c4b8b60a50aca5e87384f6b8a422fc6603c637e4c21","badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"e6ef68f677c1b63967d87568043b8af9d2dfd71d5873acd1de3abeb1db606741","ee4c2b821cdb6bb1b2ee139f8b39c3090b85ee9f21ef0c4e6da85ccc37c27190","abf86bf93468ee47bb82ef281ede349a9a5cdaa79f7623cb0c38b3b8f4d6d16d","b3adea08320fa04c6e67b5a2571f2b1835cbc09d3a1d9f9491e248ddd523ad80",{"version":"febefb735835bcc7c7f512a9ac6583d39e60b77a381a6ebfe5d065893d931f44","affectsGlobalScope":true},"869121668002b9cf188bba1b107acd7ee744c9446e66a1449dbfcc5bca521f9d","8219de3b0d8d9562babc19fe66d6d9b06a259aec7728b0ee3d05c690c0bc7ebd","523650e6460edf906889a51cd3996350e3a072ab81445b8703ad712406f4e86f","43726bb507c00fad304764a0b1e7d1e1e2485693d5748565853b84bcc76eae2c","b00a6a38b27ac8da6d1f290fcf91821a0ea76eda17409a6b776584bbf323b928","e0f585012eb7a61df9c139924d46f178a762ebf0a4f32e22656482891278f048","c2389f38d4f97b0ede032aee00627816037dd362d66150436245811bb9de3b3b","33babe20c9adb21832bf548abd2e71fbf12d2ef7712c0c77f6dd58d80cb42650","0bcf96ec816d5f3d30aac24de98373c7892724934971cc6e81c3318b6124245b","1e859aa44b6cb8edf1b42b38f5b45d7a4d4b7c5d157537a65ad9d6b38227321b","c5d5f4d1c61ba66e03a1c5dee152ae53e7f956f0a4ac867d42fedd0b222e8ae5","771043a81c343f37b3ca003c52639eea34b759cfe603ea9ee500748869d1db19","66847422c47f51670aa3c4a63c36b03e8b350c47b88cc3a595fccc6fcb1e700b","6373a6a0129bfedb2e2ffa1858a813137fc4656a01ae6973a86778d20fd4647f","eb7fbf4e57b111b45002e4b50fb2bf0f3c8267a5a4bdd5b3e1142fe198ab4797","71ed5df98c13d32d55e2941ac3951408cf56d636dc4d3e064b3fb99804c69d06","bbfdccb50fbe35e3cde5b4cd4a7b86a2694958da28a085153c0dc9753d89427e","36c05e7b3586aefb636d84a555dbec0055c85d3955ff2c388656fb6a914d5830","b7a81d9ddd3fcf7d4154b570c3f9d25e5095bcfd95fc2fd33ee89c30d4785f19","d103de0a2913b9441f245c70582cb5f94f62534d52470f854addf9bee999d826","9bd59851e397abd2bce281c8841510a96907bac3592291403400557f30d68efd","0fcaba280a7fb59281c01e7b39f2830187eabd0664bf8a8da465fa85955aac15","c956baa533de1c7d04f16c941c962f3d81f3d2463ac1ddbc76b6236a2271aad5","7cb93870a50a26953ab4ce10abe37a3722ce46aa56aa7606de3d9fb0ae0c7cab","19e20dff584ff4da2d0740ad9bc3acac618350764d8cb14ef104f1b9d07d7f17","6790ec7df08e8eaa46bd62dc4e2ace6f84e6035011c806313dc38c533dc2a5af","7ca52cabaaef26f719c4bbd54faa88fe391252fc5a2b7de2388ae872f306addd","84c013084535dcbe6edba14e9783ac43fdb6dd9f2d8f3517eee15375c780eeac","004142d65d3fe8f9eb7c98d25a72a6a1b756e7aa1ce2a29ef79ed6f75362b058","96a4e37864153ffb215a3b562e237572df79770a1ccea9e121a2a9c6a2b7c1bc","acbb1e9d529e1d8899ec719b76bcd1d7db080e00cdbb17cbf067b932f3ce24a6","679a500b60fdb879af3ff20dab0bc5937098dd1ea5b75f786c672fde09faaeef","035c74cad659923dd64bf6d84038675b352adca39eb1db2c5fb2aaad706ddb06","a15147866807eff433c82a49f14722fffae34d236b8209d2fe482e01d17827da","bd32eb2524c83f21252f825296b82bbe9861c006becb899bd65e0e3ccfef27b3","8700a6edece324a740e8c4814e066a28b59a6f82ae411fa546697ae0f160bab5","a3646c068d83643c687a9a774e4601a5859f29ff8524fdc2107aa309c06e541c","bf745adef30390f9ce2fb2e1289ead832d7cdc0e8b24a81c1466aba67146aa2e","f5c28deb6a28f159a47d235572232d42ed0e6bd8defcb8b1ca060e5e5a922949","3f7e2c3e68f5608b4ebffc2d6b7b9f241237bf4999b46c595deb32fd961ea936","61b89bcfa97b71163088a68c7a2c4236c241ef36bdd49e57d58d50ed55ecee97","c2a7c738eac005906514dcd53803f03196adbdc07959c22540a058edf45dd78f","f9eaefa84f17bd2eccdb58b2b315299f0a00e9417a0235766061233695ff3f4f","2d1ea98405903025396cba227b2ee05c43f005f83bce6ca33afe37759e691378","731d8cd4570c24819b660a60bd89e0e1f12b6e512c23827458c667a7cdb0a49e","1143318400a0da3b23951a6ec8e5ba7f787d8603064a02c9d023f6dc383bf709","7a7c3a30c1040c027c68951441667576bafeb769c1bbd1119dfe35f97d027506","d280c3b34e25d02998825aca95848a73550edc0e6cc9d7e3fb59fab7caffd023","e8b405807261832262e75fc6e511b912267db4d66b52a6319a906bf273458e61","17fd39370a6ff62e85f93b571504c0f458d22fdc0618bf8e00550375a2b8e593","b5e6514e67caeecb665d4df53669951c672de30abd1aa10a1c1da98c7b9f0de7","1d4127595cdf32eff6baa0eb1361902820309231c8796e81c61a9794a62ea23f","5e42bca6b52fd095640a945f0ed429ebda6ab011d400f0e74287d37e55ad7984","b04bbf66d68477ed776a5f0fc7de26c4e6ff71474341b3566531177db5befe21","25304de59a5dd68db6ff329ba711fa6139b25c16fb45db8fd9009875205d8e0b","acf43834501c92da619d35679372c53d08a135fce5de10cc04e2f54c07134ae1","bc8f5e3c72bcb2e68e2feb272c8312b81fd0ba7417e2993eb569aa9aba05661d","ef275855066eb67627a2e8e388226fd510824d27d2a8f5555251fe096a9def3e","3b8ab6d861339b4c45682219429441534c00abd7f23fc0714e9326213669d35a","74ff64ddbb6c72565b2ffc98652f78c3895cc40c8264ed0881ec1221e759de18","83cf78cb96cbe2cf84d7acbb777345919e79d1357bf051bd5c1da1e7d85b755a","40c1a3ed908790d2d173914c88721ea4182cac8a6b1e5e13ef268a82404828c4","8b27c6ae71f8849874f800e49d14a98c92bb0ae54e0a79d6ae617063ba2a6e5c","ce6fbdceac62521a6f474355eb2a0b85446f7dd7437ce59eed9ac9ced059d4a0","466e0434af11422a1621060ca2745a4b94067076065b6e0c0aeb874c6eaa9a63","2b1177d4681eade2485edf0433bcd0037fbd2a7e6851c9fa7d3285056d30193e","323c2d2acc276d554fff791a55433159d117aa9662ac861090a2426fa1d01ab2","ecb626a33e299fc633fdab872d726f7de7abe01e7dade946a7d0b2572854aa0a","b66bda369763090577e770ab5ba3adbaba74f25b2560d5131b4448a03e004f89","9de2b351d62216e6b894c2e8ccb9b1a44ba320afca185d071ae1e63e608b8d8d","6a1a11860069ab718960e14c936567b39e4c66d8e650e94ba4d8da60415f0a33","84f576c5d9942a70efa2b4d14c8a805134f0bb3364535964b6d9eddf94219408","84d0c690923e92fa502a2463c099f3a6a272d2f3ba3e6dedab82aa30c3d069d0","cf49d08267c66f93e5e86e2e0137f85220e525f57fa93da5b3510dae11e6ba6d","0f988bd62f9188817239c3f2793995f642aa24f6e676296777e817fae7e8a5e3","bf5b753c3de36b9fc1ec7748afef5e3c2299541511ebf89839a763d447212785","eabab93ca9a786745af72195153280e883d8e36df9829ecf8b2f539824d042be","4d02b0f99724ded7a50dcfcad5f797bc0048c54e446687f4e711f8156af56cb0","681f35c141c7a6201d5ffc038fbc28e46fb7a8702fc52b29d2d2dc7ca03328c2","1bcc518782fd7e8c494f9e7e1610db255f3b5f8837bec6f431354682ca817162","6a122c58351557c40b66aa3bb1053ca80456fc2b1962bc7706b6e663d0cd25e3","d0d504c82b2a5d2bf48b951a5502ac7284ed974e3249a4fd1c795522c11d9a0d","168eef670afa53e786ccb6afbf3cb78457ff6cc90064e80f0bc5da96cffda665","cdb9451988aef334a797bc31eed3235d7b471a6e013bd2ccc92fbf89a535f4d7","be3d99aa76a7087f501fe6bdf75f76b0a483542a8e96bf9b05ab33c3cb4521d8","d91ebb09c2ae0cf320b66c42db3811e4cc8a8ebfc63c3b1e0ee0085cf1fa51ef","b044fccf84b0f5c7cd8a1800a2ef0a7b740c062245823ce009265f4db3942623","97e85df57e051301f940bad38a1e521bf4bd5e98da75554223cd30b0126b29f3","c292ebc6194ebd86169cfb13c7c3d793aefd82143bf6e2393bcf9f9969d2b6c5","9b39acb572930d9093cae87ebc3d1cac76f85d3959c879d198e41af727d05680","d7e1d242979a986a596ba1739cf7d88117f12bdcd3512a3b0a62b0e62cc15216","018e8fa83db6e4bc72a9b7ae59114457883303ac22f3a04d7b807347542b1dd3","fef0f40e32a9e21e58a8ed60607caa0037e55c4c6fe3c842a5c3bd54888f9afa","aebf66a3565c822b77a0c63280f3b07ef3040c985cfea54ad60e91f93b171ab9","46b0a75109313e28a7fefd8da44a999ad20192c16c9df50e2618aab4653b8bac","3856293778528ce4390b8dd604f3026a83b65953b97c037aa12941440d249bd7","d110ef7cb005b60066855a3d0613dcb33e78c88ab48f1a94be49d8670d9b5496","9dca03e56594dcb6da7ec0062cbdd48d156c9a9b0a8fbbf6c90b66ff38ebd2b4","236a8048bc96944178f7459a0533cc3002e4f923a5f9bca88834d0d2a9290483","20e4d74d06c6e3fcec3c011d8f040163233f6d7a25802877cf8e6617cb8bcb64","355e5ee195122c2fa0c595859d8ca3ff0ccd7559d7f2d658043a6ed3df8ca385","942bb675b74bd5c81493e1e3955ffb6afce78e8e57bfba590d07459065c6c633","356ad0f5a5de85de948574e14bc33a86e90e04ff35691669aeed05f7667bba40","f29e54511f37f6b0c8fa2825db6498afb9ffe2ab828ea6e692b68529cdba7482","52bda44b3ad70cdddadc8b25026bfda7a9e4841df765aca63248639fbe3d0ef1","14dc7a4905d3efdbd48a308235dd845c65d6fb11900206c28c2458926197dafc","3134088754c10c988c58ad5cc63b6746e390d72c14a89d73a56100656925b532","2d90e07aed4760e7f72ac6a56c95adb8a9a183d5069d373344cdcd0586387c38","c46254cff0417e0d4e4c54b70f2e0d327eb16b4a0ac997a61d4a635b87bcfb4a","8817e5c6683a55dc63a7c5f94e1952a3897502127a7ff723928f9e2eed6642e9","00f78a355a91d468fbe9df8b06ca28c9f0a9ce735591e07ca28d8ceaeb794517","24d01508ba2c2f43d1160aad262ce6456e14eec7a7b55409a067418c39c50bbe","fa51e795c197f47e1637261e029249887cd04c36ca9b811d08af8604d8691dc8","e3c9ba3e51df8b583d78fae95aa165cbbd6f22e5b8ab39812af4dcbbb462b4cd","48400d03a4592825229ca1007145723c3245d650175c52342f53ba33ebdc93ed","469dccf4d7d12c4b6e1f5f237c76d9fe3efa2d03840ca04f2c3ac8d376f7ff19","62a25c0dcfddb1f82f0186f21c1d5aee323bc9d9dd2a60860d4bc543f6fb68ce","e6c450d02573f08e0b7253cbfadd93855c2353344e38b0681c06d44c3caaa6a3","f9e7c3a62b3cf41cb285cc2b8f5edf961ef32aa593143d708aa4c39d91d20043","301c604c264389f8f6b4911830488dade60db491489c53b8e7f782616e2b9385","0c89aa22ce07701d1ee12be114155464a8db3c6f04d30ec0a5eb158812564262","bad7ce18863ea540ea1b6a908f14bb407eeb8ba629f5daed791740cf6512c10e","167f2d017527f81a3fef64dad1aa032b5da9cd7e7830c770af5c6c44a5098f5d","d9de6be7ea546933d744a8f6c222ce18f840a68cddc8eac8c5a4af37fbc6d802","06511a15f80ee05b40d987fe15532069416e8276d6cd0b0112e6bf058c975ffe","880787c9fb1ef2e540e1f3316ef53d3fb3ce65fc286afc7a060532e8996d475d","3d8bdfc1d533479ea49c20413e5f8cf359627743df827f6ac880871cac6f9e76","da566bec95857ad3234ea65680f917c233e3e4d4418682d43548f2fc259cdf54","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","208bb742e0f201470da121bc73847c74b62cff4172f38ae5949ae77d6c9c6b71","062bd2910098fc059ba93e347649b3e126c555f7b144033d21d3f8ef63d3e39b","d7a041dfebb4e5ab34e9a6771436bd96e9ad7c42728f89a87a0d77dcab766f56","4cbbcb339f280775cc3ce9e4b10b72270ba38a609f67b1eae78a7b7fd6f8abcc","b2aafe05ff263e1146b9f656d10bf6aede5e4ba5082b49d3d95593ee5c854a73","1f89d5223bc83d2e03f674e2bf3555e9eea29e02e6bcefeb962318768abfa05b","fcede5148e973ba9ddeaec316955b19fc77568ada5aef66ed50c132c765ce310","498f94deecc8eef4f56768f37014cde4300fe53b0de6570505839bf87c2865a1","1f46f8c0dd49474c9814e69c6a6427cd6a0ab4f10d6e7bff5b46991f6daae644","6986ee58ebf74e8e869436c8a5c16ac207be092b159371c2dae49d0f3041ba3c","83452b59382bf0a05d35e86db342f39b9c3664daed38f5dbce3603364e7339a3","40d2408eb17487d927c1a35fc21b6266b9429d5d10b609898c4fa250aff92dd1","79aea5e1347069b4aeca1b6656b337f39619e39ec27ac11a4539d0d5dbea4385","0a4132e4fd0a9cd38e43bdd0d65cf2344e0a1dc5305ded22bac9cda2bb9e0a74","b13715eda434461367e0dc0d7374f313631e02b3fd5b03a299ac6b223312b802","c6196a8bb53c3bca8185c25a4319c7a60a3614b7b0475621c561e89860a4df59","7001d2b80d3339eb8e77d65f1c67451f732744877a1e96c4a992638fcce81842","3103df94f61695e93f42896943943f8005a32821ce2ccbc1233a78c27ac82474","1222ca1455aad750ff7726e7baf15bf65164d8c5c13aa115b8712e9f8e358112","e734a1bd1ef70c338f191494f9a68c3d773772def753410e0f2be66d30be2720","177b60327d337ef3a0f24261bf9feb65af82c35a00057a780d02f1bd1cb72be8","e2edff37e74c54d6292dc82246ef4ec2ec4b7ff2f4fc26a6be5fd4976698d803","eaca442e82ba2de3dfb3726c08f1edcaf294ef53d3de927f48250978d2e6527b","5288d536786bcaa0b60b5685af31205047dcf0615e8728491413f37cfeca7c95","adf35bb26ba990d31d56cbaca26065945a5b61da3ded825d76154a7e71562db0","8a486df92dd40e1d4328bc9c43de551882f471c5f9a1a38e8e95483f1722a3d0","8796565c3f8e80152aecb23d6b7a270548adf1f875baf02342c2769b5b2a6b01","e429ddb082620d532d6e17b4e30fd57111351cc63fcae8f10a79060fbaaa9f44","2abfa29cfab431662c4da4ee32426b9210f04c0907153927b8d76daf6d2903ca","f83b503393fd41f2b20ff09e48dae7b702800b5f48a171cf21edd51e8151cc2d","3cf3e7bcc6c347c98055b37a39f136cfc0f910f0c6f6bf0236d065f4b61cf1ee","13ecd737d18b855797cb1ec2ae9b4a2af259a86b472c98eb083c58622611f328","b7ec2127f3506a3010bcf159e8d9d56a70decb9a2b45e5a46dfc70b665303af0","d3d7b71a1980ad431ca3ae9bf1bd98eae99d922aa7306fcf50f860dbf127dfef","df563ba4312d3a8805ba562826f9a4b5ccc1141f413a5fe226c5e6b6d24099ac","ef69fbf8d8f3c08a94d375f474fc06a1c5a3ed88f8f05ac7e282ea047fb94cf7","91081606fa6da5b30d500f031c7a97a2d4e88de3e9cf6e1beea22d5b3b2dbf84","088703b7810394a5af823ac753cca116931df81a97183725ae1e2c4e6038268d","1347d3dd49acf0fc17720443eec35492ffb54ebb178168f1d1719336976d4b74","449543622df3ca5d450faf4b5e7276f0ac9fa7deef649fafa80107d7009873b3","62c1ad137b5d8fd4a8eb581d119190123aab9681843927c690538e63320f6dca","211f8f312bee75e48c0141734f5ff0070edef85084be2428e84565fb04405e97","fd34292e37ffd811aa6eb1e9f6b37f36a1f6810f46c3f514ad0dc5c11add39cb","0f560a25cc93501a2ad52da1c70a8cba8e08829e120093186256640561958d2d","272c2dac4baaf7fdd2d7efeef0fa2547af54cc21883c5e138b8c4d1661697a54","8dfed5c91ad36e69e6da6b7e49be929d4e19666db2b651aa839c485170a2902c","64b867c61effed7b5bc0cc06b3d8eac23b067a3fba581fc7d3c292fa593e6a45","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","3b043cf9a81854a72963fdb57d1884fc4da1cf5be69b5e0a4c5b751e58cb6d88","d0b0a00cf31968a33baeaadf974ce4e5e7edf58cea5288765293f41ba5e72b3a","82169f198ffdfc787fba368ccfad2b2d8ef3712f3c696df94ac13f6884bbbe2d","cab425b5559edac18327eb2c3c0f47e7e9f71b667290b7689faafd28aac69eae","3cfb0cb51cc2c2e1b313d7c4df04dbf7e5bda0a133c6b309bf6af77cf614b971","f992cd6cc0bcbaa4e6c810468c90f2d8595f8c6c3cf050c806397d3de8585562","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190","f014d6d053cb1840965952268a589c9e2a74d66c8c88286562d5699350e28e19","66851b263230decb3684072b2cb777f70ea3e52d4489b88f78f185618d4d398e",{"version":"e9f2cdc4e98e73a606ff68c470a8cb4f23cd638c47649d71b90a2d9413102080","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","f58599a92d4a64416f4999a4d7241e1647aec2a6249214892722f712a6eedbe0","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","6ba73232c9d3267ca36ddb83e335d474d2c0e167481e3dec416c782894e11438"],"options":{"declaration":true,"declarationMap":true,"esModuleInterop":true,"inlineSources":true,"module":1,"outDir":"./","removeComments":false,"skipDefaultLibCheck":true,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":6},"fileIdsList":[[92,277],[92],[91,92,179,180,229],[81,92,229,235,249,250],[92,270],[67,81,92],[92,277,278,279,280,281],[92,277,279],[64,67,91,92,99,283,284,285],[65,92,99],[92,288],[92,289],[92,295,297],[64,92,99],[67,91,92,99,232,233],[49,92],[52,92],[53,58,92],[54,64,65,72,81,91,92],[54,55,64,72,92],[56,92],[57,58,65,73,92],[58,81,88,92],[59,61,64,72,92],[60,92],[61,62,92],[63,64,92],[64,92],[64,65,66,81,91,92],[64,65,66,81,92],[67,72,81,91,92],[64,65,67,68,72,81,88,91,92],[67,69,81,88,91,92],[49,50,51,52,53,54,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],[64,70,92],[71,91,92],[61,64,72,81,92],[73,92],[74,92],[52,75,92],[76,90,92,96],[77,92],[78,92],[64,79,92],[79,80,92,94],[64,81,82,83,92],[81,83,92],[81,82,92],[84,92],[85,92],[64,86,87,92],[86,87,92],[58,72,88,92],[89,92],[72,90,92],[53,67,78,91,92],[58,92],[81,92,93],[92,94],[92,95],[53,58,64,66,75,81,91,92,94,96],[81,92,97],[67,81,92,99],[64,67,69,72,81,88,91,92,97,99],[92,305],[92,180,211,224,225],[92,180,184,187,191,224],[92,180,184,187,191,194,199],[92,180,191],[92,180],[92,180,183,184,188,189,190,194,198],[92,180,183,194,198,199],[92,184,192,194],[92,183,184],[92,224,229],[92,180,199,200],[92,180,181,193,194,196,198,199,202],[92,180,181,182,192,193,198,199,201],[92,180,181,199],[92,180,182,194,199],[92,180,181,182,193,194,195,196,197,199],[92,181,182,192,193,194,195,196,197,198,199,200,201,202,203,204,205,223],[92,183,184,185,186,191],[92,194,196,198,199,201],[92,180,198],[92,180,199],[92,180,199,222],[92,180,224],[92,180,203],[92,224],[92,180,208,211,224],[92,180,206,207,208,209,210,212,213,214,215,216,217,218,219,220,221],[92,213,224],[92,180,211,224],[92,180,222,224,226,227,228],[54,64,69,81,92,96,229,230,231,234,235,236,237],[92,229,238],[54,81,92,99],[92,291,292],[92,291,292,293,294],[47,48,92,176,177,178],[92,176,179],[47,48,92,99,158,159,160,161,162,163,165,166,167,168,169,170,171,172,173,174,175],[47,48,92,179],[48,92],[47,48,92],[92,179],[47,48,92,164],[47,92,179],[48,92,158],[92,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133],[92,119],[92,119,130],[92,104,121],[92,121],[92,128],[92,100],[92,104,105],[92,113],[92,104],[92,135,136],[92,137],[92,135],[92,140],[92,134,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157],[92,144],[92,142],[92,146],[92,140,149,152],[92,296],[54,81,92,247,248],[81,92],[44,45,92,238,250,274,275],[92,274],[92,238,274],[44,46,92,238,262,274],[46,92,274],[46,92,249,251,267,274],[92,246,254,257,259,260,261],[92,238,254,274],[92,238,257,274],[92,255,256],[92,229,238,251],[92,238,250,251,274],[92,238,251,257,259,274],[92,252,253,258],[92,239,240,262,267,273,275,276],[67,92,238,266,274],[67,69,91,92,238,266,274],[92,268,269,272],[92,238,266,267,271,274],[92,238,264,274],[92,238,264,267,274],[44,92,238,274],[92,238,262,274],[45,92,274],[46,92,238,243,274],[92,241,242,243,244,245,263,264,265,266],[46,92,238,274],[91,92,238,274]],"referencedMap":[[279,1],[277,2],[230,3],[231,2],[251,4],[271,5],[46,6],[44,2],[45,2],[282,7],[278,1],[280,8],[281,1],[286,9],[287,10],[284,2],[288,2],[289,11],[290,12],[298,13],[299,2],[283,14],[300,2],[233,2],[234,15],[49,16],[50,16],[52,17],[53,18],[54,19],[55,20],[56,21],[57,22],[58,23],[59,24],[60,25],[61,26],[62,26],[63,27],[64,28],[65,29],[66,30],[51,2],[98,2],[67,31],[68,32],[69,33],[99,34],[70,35],[71,36],[72,37],[73,38],[74,39],[75,40],[76,41],[77,42],[78,43],[79,44],[80,45],[81,46],[83,47],[82,48],[84,49],[85,50],[86,51],[87,52],[88,53],[89,54],[90,55],[91,56],[92,57],[93,58],[94,59],[95,60],[96,61],[97,62],[301,2],[302,2],[303,2],[285,63],[304,2],[235,64],[305,2],[306,65],[225,2],[226,66],[180,2],[188,67],[189,68],[187,69],[190,70],[191,71],[184,72],[185,73],[186,74],[183,75],[201,76],[203,77],[194,78],[182,79],[195,80],[198,81],[224,82],[192,83],[204,84],[205,2],[181,70],[196,85],[193,86],[200,86],[223,87],[199,85],[197,85],[202,88],[206,2],[207,89],[208,88],[209,88],[210,90],[212,91],[222,92],[214,93],[215,90],[216,88],[217,88],[218,90],[219,90],[220,88],[221,90],[213,94],[227,2],[211,2],[228,90],[229,95],[236,2],[238,96],[237,97],[270,98],[232,63],[291,2],[293,99],[295,100],[294,99],[292,2],[178,2],[179,101],[177,102],[176,103],[175,104],[173,105],[163,106],[47,107],[161,105],[162,105],[174,105],[166,105],[167,105],[168,105],[160,105],[165,108],[48,109],[170,105],[159,105],[172,110],[169,105],[171,105],[164,107],[134,111],[120,112],[131,113],[102,2],[122,114],[121,2],[123,115],[129,116],[128,2],[104,2],[126,2],[127,2],[113,117],[108,2],[107,118],[106,118],[103,2],[115,2],[132,119],[111,117],[100,2],[114,2],[119,2],[112,117],[109,120],[110,2],[116,118],[117,118],[130,2],[105,2],[125,2],[133,2],[101,2],[124,2],[135,2],[118,2],[137,121],[139,122],[138,122],[140,123],[144,124],[142,124],[156,121],[152,2],[158,125],[141,124],[145,126],[143,127],[157,2],[146,122],[148,128],[147,128],[153,129],[149,124],[151,126],[150,127],[154,2],[155,2],[136,2],[297,130],[296,2],[249,131],[247,132],[248,132],[250,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[6,2],[31,2],[32,2],[33,2],[34,2],[7,2],[39,2],[35,2],[36,2],[37,2],[38,2],[8,2],[40,2],[41,2],[42,2],[1,2],[9,2],[43,2],[276,133],[240,134],[254,135],[261,136],[246,137],[260,138],[262,139],[255,140],[256,141],[257,142],[252,143],[253,144],[258,145],[259,146],[274,147],[268,148],[269,149],[273,150],[272,151],[265,152],[241,2],[266,153],[243,154],[264,135],[263,155],[244,156],[245,157],[242,2],[267,158],[239,159],[275,160]],"exportedModulesMap":[[279,1],[277,2],[230,3],[231,2],[251,4],[271,5],[46,6],[44,2],[45,2],[282,7],[278,1],[280,8],[281,1],[286,9],[287,10],[284,2],[288,2],[289,11],[290,12],[298,13],[299,2],[283,14],[300,2],[233,2],[234,15],[49,16],[50,16],[52,17],[53,18],[54,19],[55,20],[56,21],[57,22],[58,23],[59,24],[60,25],[61,26],[62,26],[63,27],[64,28],[65,29],[66,30],[51,2],[98,2],[67,31],[68,32],[69,33],[99,34],[70,35],[71,36],[72,37],[73,38],[74,39],[75,40],[76,41],[77,42],[78,43],[79,44],[80,45],[81,46],[83,47],[82,48],[84,49],[85,50],[86,51],[87,52],[88,53],[89,54],[90,55],[91,56],[92,57],[93,58],[94,59],[95,60],[96,61],[97,62],[301,2],[302,2],[303,2],[285,63],[304,2],[235,64],[305,2],[306,65],[225,2],[226,66],[180,2],[188,67],[189,68],[187,69],[190,70],[191,71],[184,72],[185,73],[186,74],[183,75],[201,76],[203,77],[194,78],[182,79],[195,80],[198,81],[224,82],[192,83],[204,84],[205,2],[181,70],[196,85],[193,86],[200,86],[223,87],[199,85],[197,85],[202,88],[206,2],[207,89],[208,88],[209,88],[210,90],[212,91],[222,92],[214,93],[215,90],[216,88],[217,88],[218,90],[219,90],[220,88],[221,90],[213,94],[227,2],[211,2],[228,90],[229,95],[236,2],[238,96],[237,97],[270,98],[232,63],[291,2],[293,99],[295,100],[294,99],[292,2],[178,2],[179,101],[177,102],[176,103],[175,104],[173,105],[163,106],[47,107],[161,105],[162,105],[174,105],[166,105],[167,105],[168,105],[160,105],[165,108],[48,109],[170,105],[159,105],[172,110],[169,105],[171,105],[164,107],[134,111],[120,112],[131,113],[102,2],[122,114],[121,2],[123,115],[129,116],[128,2],[104,2],[126,2],[127,2],[113,117],[108,2],[107,118],[106,118],[103,2],[115,2],[132,119],[111,117],[100,2],[114,2],[119,2],[112,117],[109,120],[110,2],[116,118],[117,118],[130,2],[105,2],[125,2],[133,2],[101,2],[124,2],[135,2],[118,2],[137,121],[139,122],[138,122],[140,123],[144,124],[142,124],[156,121],[152,2],[158,125],[141,124],[145,126],[143,127],[157,2],[146,122],[148,128],[147,128],[153,129],[149,124],[151,126],[150,127],[154,2],[155,2],[136,2],[297,130],[296,2],[249,131],[247,132],[248,132],[250,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[6,2],[31,2],[32,2],[33,2],[34,2],[7,2],[39,2],[35,2],[36,2],[37,2],[38,2],[8,2],[40,2],[41,2],[42,2],[1,2],[9,2],[43,2],[276,133],[240,134],[254,135],[261,136],[246,137],[260,138],[262,139],[255,140],[256,141],[257,142],[252,143],[253,144],[258,145],[259,146],[274,147],[268,148],[269,149],[273,150],[272,151],[265,152],[241,2],[266,153],[243,154],[264,135],[263,155],[244,156],[245,157],[242,2],[267,158],[239,159],[275,160]],"semanticDiagnosticsPerFile":[279,277,230,231,251,271,46,44,45,282,278,280,281,286,287,284,288,289,290,298,299,283,300,233,234,49,50,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,51,98,67,68,69,99,70,71,72,73,74,75,76,77,78,79,80,81,83,82,84,85,86,87,88,89,90,91,92,93,94,95,96,97,301,302,303,285,304,235,305,306,225,226,180,188,189,187,190,191,184,185,186,183,201,203,194,182,195,198,224,192,204,205,181,196,193,200,223,199,197,202,206,207,208,209,210,212,222,214,215,216,217,218,219,220,221,213,227,211,228,229,236,238,237,270,232,291,293,295,294,292,178,179,177,176,175,173,163,47,161,162,174,166,167,168,160,165,48,170,159,172,169,171,164,134,120,131,102,122,121,123,129,128,104,126,127,113,108,107,106,103,115,132,111,100,114,119,112,109,110,116,117,130,105,125,133,101,124,135,118,137,139,138,140,144,142,156,152,158,141,145,143,157,146,148,147,153,149,151,150,154,155,136,297,296,249,247,248,250,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,39,35,36,37,38,8,40,41,42,1,9,43,276,240,254,261,246,260,262,255,256,257,252,253,258,259,274,268,269,273,272,265,241,266,243,264,263,244,245,242,267,239,275]},"version":"4.4.4"}
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/@distube/ytpl/typings/index.d.ts","../node_modules/@distube/ytsr/typings/index.d.ts","../node_modules/@distube/ytdl-core/typings/index.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/globals.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/permissions.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/emoji.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/interactions.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/sticker.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/channel.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/gateway.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/voice.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/guild.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/user.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/teams.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/application.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/webhook.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/auditLog.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/invite.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/oauth2.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/common.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/auditLog.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/utils/internals.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/channel.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/emoji.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/gateway.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/guild.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/webhook.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/interactions.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/invite.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/oauth2.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/stageInstance.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/sticker.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/template.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/user.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/voice.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rest/v9/index.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/template.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v9/index.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/rpc/v9.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/utils/v9.d.ts","../node_modules/@discordjs/builders/node_modules/discord-api-types/v9.d.ts","../node_modules/zod/lib/helpers/util.d.ts","../node_modules/zod/lib/ZodError.d.ts","../node_modules/zod/lib/helpers/parseUtil.d.ts","../node_modules/zod/lib/helpers/errorUtil.d.ts","../node_modules/zod/lib/helpers/partialUtil.d.ts","../node_modules/zod/lib/types.d.ts","../node_modules/zod/lib/external.d.ts","../node_modules/zod/lib/index.d.ts","../node_modules/@discordjs/builders/dist/index.d.ts","../node_modules/@discordjs/collection/dist/index.d.ts","../node_modules/discord.js/node_modules/discord-api-types/v9.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/node-fetch/node_modules/form-data/index.d.ts","../node_modules/@types/node-fetch/externals.d.ts","../node_modules/@types/node-fetch/index.d.ts","../node_modules/@types/ws/index.d.ts","../node_modules/discord.js/typings/enums.d.ts","../node_modules/discord.js/typings/rawDataTypes.d.ts","../node_modules/discord.js/typings/index.d.ts","../src/type.ts","../src/constant.ts","../src/struct/DisTubeError.ts","../src/struct/TaskQueue.ts","../src/struct/Playlist.ts","../src/struct/SearchResult.ts","../src/struct/Song.ts","../src/core/DisTubeOptions.ts","../node_modules/prism-media/typings/opus.d.ts","../node_modules/prism-media/typings/vorbis.d.ts","../node_modules/prism-media/typings/index.d.ts","../node_modules/tiny-typed-emitter/lib/index.d.ts","../node_modules/discord-api-types/globals.d.ts","../node_modules/discord-api-types/payloads/v9/permissions.d.ts","../node_modules/discord-api-types/payloads/v9/emoji.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts","../node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts","../node_modules/discord-api-types/payloads/v9/interactions.d.ts","../node_modules/discord-api-types/payloads/v9/sticker.d.ts","../node_modules/discord-api-types/payloads/v9/channel.d.ts","../node_modules/discord-api-types/payloads/v9/gateway.d.ts","../node_modules/discord-api-types/payloads/v9/stageInstance.d.ts","../node_modules/discord-api-types/payloads/v9/voice.d.ts","../node_modules/discord-api-types/payloads/v9/guild.d.ts","../node_modules/discord-api-types/payloads/v9/user.d.ts","../node_modules/discord-api-types/payloads/v9/teams.d.ts","../node_modules/discord-api-types/payloads/v9/application.d.ts","../node_modules/discord-api-types/payloads/v9/webhook.d.ts","../node_modules/discord-api-types/payloads/v9/auditLog.d.ts","../node_modules/discord-api-types/payloads/v9/invite.d.ts","../node_modules/discord-api-types/payloads/v9/oauth2.d.ts","../node_modules/discord-api-types/rest/common.d.ts","../node_modules/discord-api-types/rest/v9/auditLog.d.ts","../node_modules/discord-api-types/rest/v9/channel.d.ts","../node_modules/discord-api-types/rest/v9/emoji.d.ts","../node_modules/discord-api-types/rest/v9/gateway.d.ts","../node_modules/discord-api-types/utils/internals.d.ts","../node_modules/discord-api-types/rest/v9/guild.d.ts","../node_modules/discord-api-types/rest/v9/webhook.d.ts","../node_modules/discord-api-types/rest/v9/interactions.d.ts","../node_modules/discord-api-types/rest/v9/invite.d.ts","../node_modules/discord-api-types/rest/v9/oauth2.d.ts","../node_modules/discord-api-types/rest/v9/stageInstance.d.ts","../node_modules/discord-api-types/rest/v9/sticker.d.ts","../node_modules/discord-api-types/rest/v9/template.d.ts","../node_modules/discord-api-types/rest/v9/user.d.ts","../node_modules/discord-api-types/rest/v9/voice.d.ts","../node_modules/discord-api-types/rest/v9/index.d.ts","../node_modules/discord-api-types/payloads/v9/template.d.ts","../node_modules/discord-api-types/payloads/v9/index.d.ts","../node_modules/discord-api-types/gateway/common.d.ts","../node_modules/discord-api-types/gateway/v9.d.ts","../node_modules/discord-api-types/rpc/v9.d.ts","../node_modules/discord-api-types/utils/v9.d.ts","../node_modules/discord-api-types/v9.d.ts","../node_modules/@discordjs/voice/dist/index.d.ts","../src/core/voice/DJSAdapter.ts","../src/core/voice/DisTubeVoice.ts","../src/core/DisTubeBase.ts","../src/core/manager/BaseManager.ts","../src/core/manager/QueueManager.ts","../src/core/manager/index.ts","../src/core/voice/DisTubeVoiceManager.ts","../src/core/voice/index.ts","../src/core/DisTubeStream.ts","../src/core/DisTubeHandler.ts","../src/core/index.ts","../src/struct/Queue.ts","../src/struct/Plugin.ts","../src/struct/CustomPlugin.ts","../src/struct/ExtractorPlugin.ts","../src/struct/index.ts","../src/plugin/http.ts","../src/plugin/https.ts","../node_modules/execa/index.d.ts","../node_modules/@distube/youtube-dl/src/index.d.ts","../src/plugin/youtube-dl.ts","../src/plugin/index.ts","../src/index.ts","../src/util.ts","../src/DisTube.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/@types/keyv/index.d.ts","../node_modules/@types/http-cache-semantics/index.d.ts","../node_modules/@types/responselike/index.d.ts","../node_modules/@types/cacheable-request/index.d.ts","../node_modules/@types/graceful-fs/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/jest-diff/build/cleanupSemantic.d.ts","../node_modules/pretty-format/build/types.d.ts","../node_modules/pretty-format/build/index.d.ts","../node_modules/jest-diff/build/types.d.ts","../node_modules/jest-diff/build/diffLines.d.ts","../node_modules/jest-diff/build/printDiffs.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/@types/jest/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/minimist/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/parse-json/index.d.ts","../node_modules/@types/prettier/index.d.ts","../node_modules/@types/stack-utils/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"b09ed0465e2c4244a8225c322941182fbd64101dac77c76ea96ffb3797364937","6d6b07e437b620687741ea220c757e794bf218caf4251315b3e56e2e362370e1","4045e7e1708461cebbe1f34edd75fd8d9ce85ec4183dffe9dc4e7fbeca352465","eabab93ca9a786745af72195153280e883d8e36df9829ecf8b2f539824d042be","d3ed0bdc7460d95a90732872f2861a60f064318b8bad8ad4432d1c04e825c3e4","681f35c141c7a6201d5ffc038fbc28e46fb7a8702fc52b29d2d2dc7ca03328c2","cdb9451988aef334a797bc31eed3235d7b471a6e013bd2ccc92fbf89a535f4d7","8cedbf274baeb7b06233ee4adce9da566fc4c496d88b3fc6dbb58e27b7b90f58","f74b7a54220bc565c738b824fdc2f063ca727001ee9f332d5c399bc59071611f","c7f940a988e13a3948197c3448e896087f598a5a4c7814030d1e54332043d1af","55518514e8bff9cebd363d735c3e85ba1c6f7588c9f320dbc1d565086ef2fc48","9f7e239f4945672307c7d4403aa22bfe3d03f438fa072d7f158095f7df724e9f","7c5073d67f4f2546f368fe635573cfe6de977ed82318d01be15cee4c76c81199","7428869b608e55da6957d000ef9af727ec7424ebef7d2accc3901287c588b5e5","ddef4fa1fd835adfae5660c6c98b24b602fbb65db1e2570fa5d9e947ad5cb17f","e7fb389e0c13e2120c9a8c824ddfabe18e56c316e53e66072e8d86e0610791e6","1b1bd699dfd3c316e64d0d40ce6e35265c24d25a18f6a4505904a0cc21f1ff67","8441a2b8098131edeec9b5092ae81903938a8c3ec8871de2502decff35ccda50","7dbf615f4a2003faa46d93052c7abaa635aa541e266090b0b2350f40f3ae3242","9575d7cfbd601fda04531bb7a10dcc68529554c484e93e5f85a39e2101988612","d91ebb09c2ae0cf320b66c42db3811e4cc8a8ebfc63c3b1e0ee0085cf1fa51ef","b044fccf84b0f5c7cd8a1800a2ef0a7b740c062245823ce009265f4db3942623","97e85df57e051301f940bad38a1e521bf4bd5e98da75554223cd30b0126b29f3","7c717290cb697d86874835037c8aab715d9477e7377c2a53198f2093c0addb2a","e285d39bd2590bf6e30dc326b513ffbc6e7ca2d67fcd94f2761e7f54cfa46dfc","d0d504c82b2a5d2bf48b951a5502ac7284ed974e3249a4fd1c795522c11d9a0d","168eef670afa53e786ccb6afbf3cb78457ff6cc90064e80f0bc5da96cffda665","5651b6955a71b3733260dcf5f7d90f9d648d70b0c1fe24ff8bdcda589f60cbff","36ef474db058911c62a48e6137965cb1dbbdef6a5c97b6887795984d9ee53afb","f416e94790298bdfb37bdc8adb84239880af9224fb1c8513386a6e380aee805d","22af4d26bffe0e8c6c84e9d0d524d9cf770475365ca1c87467dbadd472c90b87","79ce4bd3aabe9f6232bbf25eeaad9994ca94f416139224ebb01085e5ec8290af","fef0f40e32a9e21e58a8ed60607caa0037e55c4c6fe3c842a5c3bd54888f9afa","aebf66a3565c822b77a0c63280f3b07ef3040c985cfea54ad60e91f93b171ab9","aaed09d856decdec134bd8c26a6cbf7d2584bf80c9e89c44c97e267b394b471b","6e18d45952d633c80a1d3a18171aa4a99d3dd0a1615ac2fd88fa93ec01d18ae8","ea4676f9da6673aa1835921f4d9ade3c9fa36a874633b9b90c3dbcde901da3a2","d110ef7cb005b60066855a3d0613dcb33e78c88ab48f1a94be49d8670d9b5496","f3eced93d63b305dd25c3bc0f550921dda3e40acab73276a929e9d01afe44ffe","236a8048bc96944178f7459a0533cc3002e4f923a5f9bca88834d0d2a9290483","d5a60529c38f737d3567074f9a4ec7e4da7759df10912cad6f3d8bdbe662e9a1","4334f5fea672cd97484fa8ef470e5656d0f1bfcc48af553b7f1565bd46f96497","22b6cddb5322bfe32a890fdd3f3a06264d1539f892e3a4f6dbf6f3aa8135883f","3da82fc6ac4649060e524e8bce0b8ba8fe9b17716961f859d30df03734841211","f29e54511f37f6b0c8fa2825db6498afb9ffe2ab828ea6e692b68529cdba7482","437b16e89921dc25ab6313e6685d08c6de6a7df806ff0ffd83596116cb69a0ca","6028cfd2497f620b82b9e75502d3ae11dbb22b87286e2f21859cd5818f75ce9e","543771e77174eda3343f06a7edd0af8b044d83ac8b5e73ec7fbe576fa090d4a2","3134088754c10c988c58ad5cc63b6746e390d72c14a89d73a56100656925b532","95f782b13666a491781b662afacf326f2733f44d8e69a3302ef6e8f30e5784e4","b26659455eb3489593a2bc52a3db4ba638ac626b3a6b2c487c60616846eb33bb","3eba383986313232108bd804db31b71f60367732f6bb08b0a595089efb8f2652","0421ecd58522337c4659fd264eaa659281f494811728c6c9cb873f027719e9d8","5997a6356ec3bca0376b56cd4273adff367934c192e80acb9ca84b2a141727be","fa51e795c197f47e1637261e029249887cd04c36ca9b811d08af8604d8691dc8","d49cc486d093e5e8ae1c26ab9ef34ff6aa3b370173b72a8c7f26d5405abbd896","eb01a7a34a9801b025e68ffcfeba35878026ef0aed36c5d5c1167c27509e68ba","60935703b458c8c407471d3a87112e7733cae17198cf1fa254020c0ffed85b1d","eeabb4e164fe8fbc0caf6afec094230498edc84e7239a3ad38b9c9255b36f80b","e6c450d02573f08e0b7253cbfadd93855c2353344e38b0681c06d44c3caaa6a3","cae3abdc49bdbbefe16879b9e0e08a7c1c8cd2864b7d64645dff1112901145ba","301c604c264389f8f6b4911830488dade60db491489c53b8e7f782616e2b9385","37f92d1fb75f356fcb796bd0dcb65a8a49c93676c1804c13649a690abdd6f2a3","bad7ce18863ea540ea1b6a908f14bb407eeb8ba629f5daed791740cf6512c10e","bc75aa14918b32aab1b84c9f036e0d0636a67a34d87a5c9b8663a43434cb46bf","d9de6be7ea546933d744a8f6c222ce18f840a68cddc8eac8c5a4af37fbc6d802","06511a15f80ee05b40d987fe15532069416e8276d6cd0b0112e6bf058c975ffe","880787c9fb1ef2e540e1f3316ef53d3fb3ce65fc286afc7a060532e8996d475d","f7cd03b1e878621ae53bb9b2898d8cf3e13e79659d544baf0f5a6a39129426a5","9ca70efd76c176145bedb96c56bb726a09b639089f8dedc48a0891be41af29f8","67426c8c5bfb212bd166d5e9418344563c0a87b6f88dd15b9eb7a8d85b763461","f967fb1409dcf8a09eb7cfe815797c33df09a983f1cc28312d78f337791b5110","e68649aeefad399668a19be92e2a47aaf4f7e92818404f781e988834e52026ea","ee621a22b03038e415f92f1a0535c86d7e6f942cba9cd2ccf60b49442fbd142e","372026b0cf2ec3a8d6fe0ff9658056b406389495792369a86cdb38baa6b5e98a","c351c2643b4dc6b14e48d3b522c7f5f0f72e921c2dcb8e4065af9dc60bd3f340","5ee80e0f257336250b9db7ff9f444a31e8bbe8d572e2a128d0d47322a790ce15","ee20d6364acdfe569d2a3e97d1e2a062d64d8b658fa117037a0b2215abd7f163","880787c9fb1ef2e540e1f3316ef53d3fb3ce65fc286afc7a060532e8996d475d","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"9acfe4d1ff027015151ce81d60797b04b52bffe97ad8310bb0ec2e8fd61e1303","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","b9b963043551b034abd9e7c6d859f7a81d99479fde938d983114d167d0644a78","160cc6e3d06938535bc887754afe5798c22d81ce83a9792ebfe2371a70f2ffc2","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"eecd493fc62c4dba3d988e2d7dff63299bf12ab49f5c9021dfef8dcc1ff2089e","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","d7838022c7dab596357a9604b9c6adffe37dc34085ce0779c958ce9545bd7139","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"a7971f9fb2a32ec7788ec6cda9d7a33c02023dfe9a62db2030ad1359649d8050","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4","d88ecca73348e7c337541c4b8b60a50aca5e87384f6b8a422fc6603c637e4c21","badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1cdb8f094b969dcc183745dc88404e2d8fcf2a858c6e7cc2441011476573238e","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","208bb742e0f201470da121bc73847c74b62cff4172f38ae5949ae77d6c9c6b71","062bd2910098fc059ba93e347649b3e126c555f7b144033d21d3f8ef63d3e39b","012a04966bcb8a6f522ccd21f6efac3d837f3ea806c55b5849556aad22777f38","4b5ecb9edde130bbc95224b449b4eae534ee9ad3e2fa955815d2f688a2cd8dbc","c928bb9d9f991e1065e1bdc5658e146279d1467607cd56fe2db448adca9096aa","b793cc516f23101e90cf189d0ee752288a0c757219f74374a017c06e66ddb12b","fcede5148e973ba9ddeaec316955b19fc77568ada5aef66ed50c132c765ce310","498f94deecc8eef4f56768f37014cde4300fe53b0de6570505839bf87c2865a1","3f396f3d4de92f626efa50d9a82438560ecdfe0a0d676dbea48e0ec3486562c1","6986ee58ebf74e8e869436c8a5c16ac207be092b159371c2dae49d0f3041ba3c","83452b59382bf0a05d35e86db342f39b9c3664daed38f5dbce3603364e7339a3","40d2408eb17487d927c1a35fc21b6266b9429d5d10b609898c4fa250aff92dd1","79aea5e1347069b4aeca1b6656b337f39619e39ec27ac11a4539d0d5dbea4385","0a4132e4fd0a9cd38e43bdd0d65cf2344e0a1dc5305ded22bac9cda2bb9e0a74","b13715eda434461367e0dc0d7374f313631e02b3fd5b03a299ac6b223312b802","c6196a8bb53c3bca8185c25a4319c7a60a3614b7b0475621c561e89860a4df59","7001d2b80d3339eb8e77d65f1c67451f732744877a1e96c4a992638fcce81842","3103df94f61695e93f42896943943f8005a32821ce2ccbc1233a78c27ac82474","eabab93ca9a786745af72195153280e883d8e36df9829ecf8b2f539824d042be","4d02b0f99724ded7a50dcfcad5f797bc0048c54e446687f4e711f8156af56cb0","681f35c141c7a6201d5ffc038fbc28e46fb7a8702fc52b29d2d2dc7ca03328c2","1bcc518782fd7e8c494f9e7e1610db255f3b5f8837bec6f431354682ca817162","6a122c58351557c40b66aa3bb1053ca80456fc2b1962bc7706b6e663d0cd25e3","d0d504c82b2a5d2bf48b951a5502ac7284ed974e3249a4fd1c795522c11d9a0d","168eef670afa53e786ccb6afbf3cb78457ff6cc90064e80f0bc5da96cffda665","cdb9451988aef334a797bc31eed3235d7b471a6e013bd2ccc92fbf89a535f4d7","be3d99aa76a7087f501fe6bdf75f76b0a483542a8e96bf9b05ab33c3cb4521d8","d91ebb09c2ae0cf320b66c42db3811e4cc8a8ebfc63c3b1e0ee0085cf1fa51ef","b044fccf84b0f5c7cd8a1800a2ef0a7b740c062245823ce009265f4db3942623","97e85df57e051301f940bad38a1e521bf4bd5e98da75554223cd30b0126b29f3","c292ebc6194ebd86169cfb13c7c3d793aefd82143bf6e2393bcf9f9969d2b6c5","9b39acb572930d9093cae87ebc3d1cac76f85d3959c879d198e41af727d05680","d7e1d242979a986a596ba1739cf7d88117f12bdcd3512a3b0a62b0e62cc15216","018e8fa83db6e4bc72a9b7ae59114457883303ac22f3a04d7b807347542b1dd3","fef0f40e32a9e21e58a8ed60607caa0037e55c4c6fe3c842a5c3bd54888f9afa","aebf66a3565c822b77a0c63280f3b07ef3040c985cfea54ad60e91f93b171ab9","46b0a75109313e28a7fefd8da44a999ad20192c16c9df50e2618aab4653b8bac","3856293778528ce4390b8dd604f3026a83b65953b97c037aa12941440d249bd7","d110ef7cb005b60066855a3d0613dcb33e78c88ab48f1a94be49d8670d9b5496","9dca03e56594dcb6da7ec0062cbdd48d156c9a9b0a8fbbf6c90b66ff38ebd2b4","236a8048bc96944178f7459a0533cc3002e4f923a5f9bca88834d0d2a9290483","20e4d74d06c6e3fcec3c011d8f040163233f6d7a25802877cf8e6617cb8bcb64","355e5ee195122c2fa0c595859d8ca3ff0ccd7559d7f2d658043a6ed3df8ca385","942bb675b74bd5c81493e1e3955ffb6afce78e8e57bfba590d07459065c6c633","356ad0f5a5de85de948574e14bc33a86e90e04ff35691669aeed05f7667bba40","f29e54511f37f6b0c8fa2825db6498afb9ffe2ab828ea6e692b68529cdba7482","52bda44b3ad70cdddadc8b25026bfda7a9e4841df765aca63248639fbe3d0ef1","14dc7a4905d3efdbd48a308235dd845c65d6fb11900206c28c2458926197dafc","3134088754c10c988c58ad5cc63b6746e390d72c14a89d73a56100656925b532","2d90e07aed4760e7f72ac6a56c95adb8a9a183d5069d373344cdcd0586387c38","c46254cff0417e0d4e4c54b70f2e0d327eb16b4a0ac997a61d4a635b87bcfb4a","8817e5c6683a55dc63a7c5f94e1952a3897502127a7ff723928f9e2eed6642e9","00f78a355a91d468fbe9df8b06ca28c9f0a9ce735591e07ca28d8ceaeb794517","24d01508ba2c2f43d1160aad262ce6456e14eec7a7b55409a067418c39c50bbe","fa51e795c197f47e1637261e029249887cd04c36ca9b811d08af8604d8691dc8","e3c9ba3e51df8b583d78fae95aa165cbbd6f22e5b8ab39812af4dcbbb462b4cd","48400d03a4592825229ca1007145723c3245d650175c52342f53ba33ebdc93ed","469dccf4d7d12c4b6e1f5f237c76d9fe3efa2d03840ca04f2c3ac8d376f7ff19","62a25c0dcfddb1f82f0186f21c1d5aee323bc9d9dd2a60860d4bc543f6fb68ce","e6c450d02573f08e0b7253cbfadd93855c2353344e38b0681c06d44c3caaa6a3","f9e7c3a62b3cf41cb285cc2b8f5edf961ef32aa593143d708aa4c39d91d20043","301c604c264389f8f6b4911830488dade60db491489c53b8e7f782616e2b9385","0c89aa22ce07701d1ee12be114155464a8db3c6f04d30ec0a5eb158812564262","bad7ce18863ea540ea1b6a908f14bb407eeb8ba629f5daed791740cf6512c10e","167f2d017527f81a3fef64dad1aa032b5da9cd7e7830c770af5c6c44a5098f5d","d9de6be7ea546933d744a8f6c222ce18f840a68cddc8eac8c5a4af37fbc6d802","06511a15f80ee05b40d987fe15532069416e8276d6cd0b0112e6bf058c975ffe","880787c9fb1ef2e540e1f3316ef53d3fb3ce65fc286afc7a060532e8996d475d","1222ca1455aad750ff7726e7baf15bf65164d8c5c13aa115b8712e9f8e358112","e734a1bd1ef70c338f191494f9a68c3d773772def753410e0f2be66d30be2720","f719cd45cfbbbaec9d629c15022bb4e874a01b1f97977d9f6e710b641e2ca33e","e2edff37e74c54d6292dc82246ef4ec2ec4b7ff2f4fc26a6be5fd4976698d803","eaca442e82ba2de3dfb3726c08f1edcaf294ef53d3de927f48250978d2e6527b","49202ee6cb20ce3559a9c6387847885277fa436ef0072f04019aecf51ff9d16b","adf35bb26ba990d31d56cbaca26065945a5b61da3ded825d76154a7e71562db0","8a486df92dd40e1d4328bc9c43de551882f471c5f9a1a38e8e95483f1722a3d0","8796565c3f8e80152aecb23d6b7a270548adf1f875baf02342c2769b5b2a6b01","27ed9771f59ff0b452392c6a041ac81031b7fdb59218ebc271a40153ab4218a5","2abfa29cfab431662c4da4ee32426b9210f04c0907153927b8d76daf6d2903ca","f83b503393fd41f2b20ff09e48dae7b702800b5f48a171cf21edd51e8151cc2d","3cf3e7bcc6c347c98055b37a39f136cfc0f910f0c6f6bf0236d065f4b61cf1ee","13ecd737d18b855797cb1ec2ae9b4a2af259a86b472c98eb083c58622611f328","b7ec2127f3506a3010bcf159e8d9d56a70decb9a2b45e5a46dfc70b665303af0","d3d7b71a1980ad431ca3ae9bf1bd98eae99d922aa7306fcf50f860dbf127dfef","df563ba4312d3a8805ba562826f9a4b5ccc1141f413a5fe226c5e6b6d24099ac","ef69fbf8d8f3c08a94d375f474fc06a1c5a3ed88f8f05ac7e282ea047fb94cf7","91081606fa6da5b30d500f031c7a97a2d4e88de3e9cf6e1beea22d5b3b2dbf84","088703b7810394a5af823ac753cca116931df81a97183725ae1e2c4e6038268d","1347d3dd49acf0fc17720443eec35492ffb54ebb178168f1d1719336976d4b74","449543622df3ca5d450faf4b5e7276f0ac9fa7deef649fafa80107d7009873b3","62c1ad137b5d8fd4a8eb581d119190123aab9681843927c690538e63320f6dca","211f8f312bee75e48c0141734f5ff0070edef85084be2428e84565fb04405e97","3e8914e49049ad3cfa2e509873787c84d5130984e830ba9a3b7ae98346a6e864","0f560a25cc93501a2ad52da1c70a8cba8e08829e120093186256640561958d2d","d5d7b68f5369a210c235cd65458369888f8b839192d088c964f21cab3ac954db","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","64b867c61effed7b5bc0cc06b3d8eac23b067a3fba581fc7d3c292fa593e6a45","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","3b043cf9a81854a72963fdb57d1884fc4da1cf5be69b5e0a4c5b751e58cb6d88","dd5647a9ccccb2b074dca8a02b00948ac293091ebe73fdf2e6e98f718819f669","82169f198ffdfc787fba368ccfad2b2d8ef3712f3c696df94ac13f6884bbbe2d","cab425b5559edac18327eb2c3c0f47e7e9f71b667290b7689faafd28aac69eae","3cfb0cb51cc2c2e1b313d7c4df04dbf7e5bda0a133c6b309bf6af77cf614b971","f992cd6cc0bcbaa4e6c810468c90f2d8595f8c6c3cf050c806397d3de8585562","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190",{"version":"6ff2ca51e2c9d88d6d904c481879b12ec0cad2a69b88e220859a52207444773b","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","9d9e658d1d5b805562749ce383ef8c67ccb796394d8734d9c138788d7dab6ee3","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","6ba73232c9d3267ca36ddb83e335d474d2c0e167481e3dec416c782894e11438"],"options":{"declaration":true,"declarationMap":true,"esModuleInterop":true,"inlineSources":true,"module":1,"outDir":"./","removeComments":false,"skipDefaultLibCheck":true,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":6},"fileIdsList":[[167,270],[167],[48,112,120,166,167],[48,90,107,108,167],[52,167],[52,53,167],[48,52,53,75,167],[48,52,53,167],[52,53,64,167],[52,53,62,167],[48,51,52,54,55,56,57,58,59,60,61,62,63,67,69,107,167],[48,51,67,69,75,81,167],[48,67,167],[48,167],[48,64,65,66,68,69,75,80,167],[107,167],[48,68,75,80,81,167],[69,73,75,167],[68,69,167],[67,107,112,167],[48,81,82,167],[48,49,74,75,77,79,80,81,84,167],[48,49,50,73,74,80,81,83,167],[48,49,81,167],[48,50,75,81,167],[48,49,50,74,75,76,77,78,79,81,167],[48,80,81,167],[49,50,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,106,167],[67,68,69,70,71,72,167],[75,77,79,80,81,83,167],[48,80,167],[48,81,167],[48,81,105,167],[48,107,167],[48,85,167],[48,90,107,167],[48,90,91,107,167],[48,90,112,167],[48,88,89,91,92,93,94,95,96,97,98,99,100,101,102,103,104,167],[90,96,107,167],[90,107,167],[48,105,107,109,110,111,167],[156,167,178,192,193,243],[167,263],[142,156,167],[167,270,271,272,273,274],[167,270,272],[139,142,166,167,174,276,277,278],[140,167,174],[167,281],[167,282],[167,286,290],[139,167,174],[142,166,167,174,175,176],[142,156,167,174],[124,167],[127,167],[128,133,167],[129,139,140,147,156,166,167],[129,130,139,147,167],[131,167],[132,133,140,148,167],[133,156,163,167],[134,136,139,147,167],[135,167],[136,137,167],[138,139,167],[139,167],[139,140,141,156,166,167],[139,140,141,156,167],[142,147,156,166,167],[139,140,142,143,147,156,163,166,167],[142,144,156,163,166,167],[124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173],[139,145,167],[146,166,167],[136,139,147,156,167],[148,167],[149,167],[127,150,167],[151,165,167,171],[152,167],[153,167],[139,154,167],[154,155,167,169],[139,156,157,158,167],[156,158,167],[156,157,167],[159,167],[160,167],[139,161,162,167],[161,162,167],[133,147,163,167],[164,167],[147,165,167],[128,142,153,166,167],[133,167],[156,167,168],[167,169],[167,170],[128,133,139,141,150,156,166,167,169,171],[156,167,172],[139,142,144,156,163,166,167,172,174],[167,298],[167,194,225,238,239],[167,194,198,201,205,238],[167,194,198,201,205,208,213],[167,194,205],[167,194],[167,194,197,198,202,203,204,208,212],[167,194,197,208,212,213],[167,198,206,208],[167,197,198],[167,238,243],[167,194,213,214],[167,194,195,207,208,210,212,213,216],[167,194,195,196,206,207,212,213,215],[167,194,195,213],[167,194,196,208,213],[167,194,195,196,207,208,209,210,211,213],[167,195,196,206,207,208,209,210,211,212,213,214,215,216,217,218,219,237],[167,197,198,199,200,205],[167,208,210,212,213,215],[167,194,212],[167,194,213],[167,194,213,236],[167,194,238],[167,194,217],[167,238],[167,194,222,225,238],[167,194,220,221,222,223,224,226,227,228,229,230,231,232,233,234,235],[167,227,238],[167,194,225,238],[167,194,236,238,240,241,242],[112,121,122,129,139,144,156,167,171,177,178,179,180],[112,167,181],[129,156,167,174],[167,284,287],[167,284,287,288,289],[167,286],[167,285],[129,156,167,190,191],[156,167],[113,115,167],[114,115,118,167],[114,167],[120,167],[119,167],[113,114,115,116,117,167],[45,46,167,181,193,267,268],[167,267],[167,181,267],[45,47,167,181,255,267],[47,167,267],[47,167,192,244,260,267],[167,189,247,250,252,253,254],[167,181,247,267],[167,181,250,267],[167,248,249],[167,181,243,244],[167,181,193,244,267],[167,181,244,250,252,267],[167,245,246,251],[167,182,183,255,260,266,268,269],[142,167,181,259,267],[142,144,166,167,181,259,267],[167,261,262,265],[167,181,259,260,264,267],[167,181,257,267],[167,181,257,260,267],[45,167,181,267],[167,181,255,267],[46,167,267],[47,167,181,186,267],[167,184,185,186,187,188,256,257,258,259],[47,167,181,267],[139,166,167,181,244,267]],"referencedMap":[[272,1],[270,2],[121,3],[108,2],[109,4],[48,2],[53,5],[56,6],[58,7],[55,6],[60,8],[61,6],[59,8],[52,2],[54,6],[62,9],[63,10],[57,8],[64,11],[65,12],[51,13],[66,14],[67,15],[72,16],[69,17],[70,18],[71,19],[68,20],[83,21],[85,22],[75,23],[50,24],[76,25],[80,26],[79,27],[107,28],[73,29],[86,30],[87,2],[49,14],[77,31],[74,32],[82,32],[106,33],[81,31],[78,31],[84,34],[88,2],[89,35],[91,36],[92,36],[93,16],[94,37],[95,38],[105,39],[97,40],[98,34],[99,34],[100,36],[101,41],[102,41],[103,36],[104,16],[96,36],[110,2],[90,2],[111,16],[112,42],[122,2],[244,43],[264,44],[47,45],[45,2],[46,2],[275,46],[271,1],[273,47],[274,1],[279,48],[280,49],[277,2],[281,2],[282,50],[283,51],[291,52],[292,2],[276,53],[293,2],[176,2],[177,54],[175,55],[124,56],[125,56],[127,57],[128,58],[129,59],[130,60],[131,61],[132,62],[133,63],[134,64],[135,65],[136,66],[137,66],[138,67],[139,68],[140,69],[141,70],[126,2],[173,2],[142,71],[143,72],[144,73],[174,74],[145,75],[146,76],[147,77],[148,78],[149,79],[150,80],[151,81],[152,82],[153,83],[154,84],[155,85],[156,86],[158,87],[157,88],[159,89],[160,90],[161,91],[162,92],[163,93],[164,94],[165,95],[166,96],[167,97],[168,98],[169,99],[170,100],[171,101],[172,102],[294,2],[295,2],[296,2],[278,55],[297,2],[178,103],[298,2],[299,104],[239,2],[240,105],[194,2],[202,106],[203,107],[201,108],[204,109],[205,110],[198,111],[199,112],[200,113],[197,114],[215,115],[217,116],[208,117],[196,118],[209,119],[212,120],[238,121],[206,122],[218,123],[219,2],[195,109],[210,124],[207,125],[214,125],[237,126],[213,124],[211,124],[216,127],[220,2],[221,128],[222,127],[223,127],[224,129],[226,130],[236,131],[228,132],[229,129],[230,127],[231,127],[232,129],[233,129],[234,127],[235,129],[227,133],[241,2],[225,2],[242,129],[243,134],[123,42],[179,2],[181,135],[180,136],[263,137],[284,2],[288,138],[290,139],[289,138],[287,140],[286,141],[285,2],[192,142],[190,143],[191,143],[193,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[6,2],[31,2],[32,2],[33,2],[34,2],[7,2],[39,2],[35,2],[36,2],[37,2],[38,2],[8,2],[43,2],[40,2],[41,2],[42,2],[1,2],[9,2],[44,2],[114,144],[119,145],[116,2],[115,146],[117,147],[113,2],[120,148],[118,149],[269,150],[183,151],[247,152],[254,153],[189,154],[253,155],[255,156],[248,157],[249,158],[250,159],[245,160],[246,161],[251,162],[252,163],[267,164],[261,165],[262,166],[266,167],[265,168],[258,169],[184,2],[259,170],[186,171],[257,152],[256,172],[187,173],[188,174],[185,2],[260,175],[182,176],[268,177]],"exportedModulesMap":[[272,1],[270,2],[121,3],[108,2],[109,4],[48,2],[53,5],[56,6],[58,7],[55,6],[60,8],[61,6],[59,8],[52,2],[54,6],[62,9],[63,10],[57,8],[64,11],[65,12],[51,13],[66,14],[67,15],[72,16],[69,17],[70,18],[71,19],[68,20],[83,21],[85,22],[75,23],[50,24],[76,25],[80,26],[79,27],[107,28],[73,29],[86,30],[87,2],[49,14],[77,31],[74,32],[82,32],[106,33],[81,31],[78,31],[84,34],[88,2],[89,35],[91,36],[92,36],[93,16],[94,37],[95,38],[105,39],[97,40],[98,34],[99,34],[100,36],[101,41],[102,41],[103,36],[104,16],[96,36],[110,2],[90,2],[111,16],[112,42],[122,2],[244,43],[264,44],[47,45],[45,2],[46,2],[275,46],[271,1],[273,47],[274,1],[279,48],[280,49],[277,2],[281,2],[282,50],[283,51],[291,52],[292,2],[276,53],[293,2],[176,2],[177,54],[175,55],[124,56],[125,56],[127,57],[128,58],[129,59],[130,60],[131,61],[132,62],[133,63],[134,64],[135,65],[136,66],[137,66],[138,67],[139,68],[140,69],[141,70],[126,2],[173,2],[142,71],[143,72],[144,73],[174,74],[145,75],[146,76],[147,77],[148,78],[149,79],[150,80],[151,81],[152,82],[153,83],[154,84],[155,85],[156,86],[158,87],[157,88],[159,89],[160,90],[161,91],[162,92],[163,93],[164,94],[165,95],[166,96],[167,97],[168,98],[169,99],[170,100],[171,101],[172,102],[294,2],[295,2],[296,2],[278,55],[297,2],[178,103],[298,2],[299,104],[239,2],[240,105],[194,2],[202,106],[203,107],[201,108],[204,109],[205,110],[198,111],[199,112],[200,113],[197,114],[215,115],[217,116],[208,117],[196,118],[209,119],[212,120],[238,121],[206,122],[218,123],[219,2],[195,109],[210,124],[207,125],[214,125],[237,126],[213,124],[211,124],[216,127],[220,2],[221,128],[222,127],[223,127],[224,129],[226,130],[236,131],[228,132],[229,129],[230,127],[231,127],[232,129],[233,129],[234,127],[235,129],[227,133],[241,2],[225,2],[242,129],[243,134],[123,42],[179,2],[181,135],[180,136],[263,137],[284,2],[288,138],[290,139],[289,138],[287,140],[286,141],[285,2],[192,142],[190,143],[191,143],[193,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[6,2],[31,2],[32,2],[33,2],[34,2],[7,2],[39,2],[35,2],[36,2],[37,2],[38,2],[8,2],[43,2],[40,2],[41,2],[42,2],[1,2],[9,2],[44,2],[114,144],[119,145],[116,2],[115,146],[117,147],[113,2],[120,148],[118,149],[269,150],[183,151],[247,152],[254,153],[189,154],[253,155],[255,156],[248,157],[249,158],[250,159],[245,160],[246,161],[251,162],[252,163],[267,164],[261,165],[262,166],[266,167],[265,168],[258,169],[184,2],[259,170],[186,171],[257,152],[256,172],[187,173],[188,174],[185,2],[260,175],[182,176],[268,177]],"semanticDiagnosticsPerFile":[272,270,121,108,109,48,53,56,58,55,60,61,59,52,54,62,63,57,64,65,51,66,67,72,69,70,71,68,83,85,75,50,76,80,79,107,73,86,87,49,77,74,82,106,81,78,84,88,89,91,92,93,94,95,105,97,98,99,100,101,102,103,104,96,110,90,111,112,122,244,264,47,45,46,275,271,273,274,279,280,277,281,282,283,291,292,276,293,176,177,175,124,125,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,126,173,142,143,144,174,145,146,147,148,149,150,151,152,153,154,155,156,158,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,294,295,296,278,297,178,298,299,239,240,194,202,203,201,204,205,198,199,200,197,215,217,208,196,209,212,238,206,218,219,195,210,207,214,237,213,211,216,220,221,222,223,224,226,236,228,229,230,231,232,233,234,235,227,241,225,242,243,123,179,181,180,263,284,288,290,289,287,286,285,192,190,191,193,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,39,35,36,37,38,8,43,40,41,42,1,9,44,114,119,116,115,117,113,120,118,269,183,247,254,189,253,255,248,249,250,245,246,251,252,267,261,262,266,265,258,184,259,186,257,256,187,188,185,260,182,268]},"version":"4.5.4"}
package/dist/util.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { GuildIDResolvable } from ".";
2
+ import type { AudioPlayer, AudioPlayerStatus, VoiceConnection, VoiceConnectionStatus } from "@discordjs/voice";
2
3
  import type { Client, ClientOptions, Guild, GuildMember, Message, Snowflake, StageChannel, TextChannel, VoiceChannel, VoiceState } from "discord.js";
3
4
  /**
4
5
  * Format duration to string
@@ -44,4 +45,5 @@ export declare function isGuildInstance(guild: any): guild is Guild;
44
45
  export declare function resolveGuildID(resolvable: GuildIDResolvable): Snowflake;
45
46
  export declare function isClientInstance(client: any): client is Client;
46
47
  export declare function checkInvalidKey(target: Record<string, any>, source: Record<string, any> | string[], sourceName: string): void;
48
+ export declare function entersState<T extends VoiceConnection | AudioPlayer>(target: T, status: T extends VoiceConnection ? VoiceConnectionStatus : AudioPlayerStatus, maxTime: number): Promise<T>;
47
49
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAC;AAC3C,OAAO,KAAK,EAEV,MAAM,EACN,aAAa,EACb,KAAK,EACL,WAAW,EAEX,OAAO,EACP,SAAS,EACT,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACX,MAAM,YAAY,CAAC;AAIpB;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQlD;AACD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAY3C;AACD;;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AS,CAWvE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,MAAM,CAE9D;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE,EACtC,UAAU,EAAE,MAAM,QAQnB;AAqBD,wBAAsB,WAAW,CAAC,CAAC,SAAS,eAAe,GAAG,WAAW,EACvE,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,CAAC,SAAS,eAAe,GAAG,qBAAqB,GAAG,iBAAiB,EAC7E,OAAO,EAAE,MAAM,cAIhB"}
package/dist/util.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkInvalidKey = exports.isClientInstance = exports.resolveGuildID = exports.isGuildInstance = exports.isSupportedVoiceChannel = exports.isMessageInstance = exports.isTextChannelInstance = exports.isMemberInstance = exports.isSnowflake = exports.isVoiceChannelEmpty = exports.checkIntents = exports.isURL = exports.parseNumber = exports.toSecond = exports.formatDuration = void 0;
3
+ exports.entersState = exports.checkInvalidKey = exports.isClientInstance = exports.resolveGuildID = exports.isGuildInstance = exports.isSupportedVoiceChannel = exports.isMessageInstance = exports.isTextChannelInstance = exports.isMemberInstance = exports.isSnowflake = exports.isVoiceChannelEmpty = exports.checkIntents = exports.isURL = exports.parseNumber = exports.toSecond = exports.formatDuration = void 0;
4
4
  const url_1 = require("url");
5
5
  const _1 = require(".");
6
6
  const discord_js_1 = require("discord.js");
@@ -152,7 +152,7 @@ exports.isMessageInstance = isMessageInstance;
152
152
  function isSupportedVoiceChannel(channel) {
153
153
  var _a;
154
154
  return (!!channel &&
155
- channel.deleted === false &&
155
+ typeof channel.joinable === "boolean" &&
156
156
  isSnowflake(channel.id) &&
157
157
  isSnowflake((_a = channel.guild) === null || _a === void 0 ? void 0 : _a.id) &&
158
158
  typeof channel.full === "boolean" &&
@@ -202,4 +202,29 @@ function checkInvalidKey(target, source, sourceName) {
202
202
  throw new _1.DisTubeError("INVALID_KEY", sourceName, invalidKey);
203
203
  }
204
204
  exports.checkInvalidKey = checkInvalidKey;
205
+ async function waitEvent(target, status, maxTime) {
206
+ let cleanup = () => undefined;
207
+ try {
208
+ await new Promise((resolve, reject) => {
209
+ const timeout = setTimeout(() => reject(new Error(`Didn't trigger ${status} within ${maxTime}ms`)), maxTime);
210
+ target.once(status, resolve);
211
+ target.once("error", reject);
212
+ cleanup = () => {
213
+ clearTimeout(timeout);
214
+ target.off(status, resolve);
215
+ target.off("error", reject);
216
+ };
217
+ });
218
+ return target;
219
+ }
220
+ finally {
221
+ cleanup();
222
+ }
223
+ }
224
+ async function entersState(target, status, maxTime) {
225
+ if (target.state.status === status)
226
+ return target;
227
+ return waitEvent(target, status, maxTime);
228
+ }
229
+ exports.entersState = entersState;
205
230
  //# sourceMappingURL=util.js.map
package/dist/util.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAC1B,wBAAsD;AACtD,2CAAoD;AAiBpD,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEhE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,GAAW;IACxC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9C,MAA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CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9E,IAAI,UAAU;QAAE,MAAM,IAAI,eAAY,CAAC,aAAa,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAChF,CAAC;AAXD,0CAWC","sourcesContent":["import { URL } from \"url\";\nimport { DisTubeError, DisTubeVoice, Queue } from \".\";\nimport { Intents, SnowflakeUtil } from \"discord.js\";\nimport type { GuildIDResolvable } from \".\";\nimport type {\n BitFieldResolvable,\n Client,\n ClientOptions,\n Guild,\n GuildMember,\n IntentsString,\n Message,\n Snowflake,\n StageChannel,\n TextChannel,\n VoiceChannel,\n VoiceState,\n} from \"discord.js\";\n\nconst formatInt = (int: number) => (int < 10 ? `0${int}` : int);\n\n/**\n * Format duration to string\n * @param {number} sec Duration in seconds\n * @returns {string}\n */\nexport function formatDuration(sec: number): string {\n if (!sec || !Number(sec)) return \"00:00\";\n const seconds = Math.round(sec % 60);\n const minutes = Math.floor((sec % 3600) / 60);\n const hours = Math.floor(sec / 3600);\n if (hours > 0) return `${formatInt(hours)}:${formatInt(minutes)}:${formatInt(seconds)}`;\n if (minutes > 0) return `${formatInt(minutes)}:${formatInt(seconds)}`;\n return `00:${formatInt(seconds)}`;\n}\n/**\n * Convert formatted duration to seconds\n * @param {*} input Formatted duration string\n * @returns {number}\n */\nexport function toSecond(input: any): number {\n if (!input) return 0;\n if (typeof input !== \"string\") return Number(input) || 0;\n if (input.match(/:/g)) {\n const time = input.split(\":\").reverse();\n let s = 0;\n for (let i = 0; i < 3; i++) if (time[i]) s += Number(time[i].replace(/[^\\d.]+/g, \"\")) * Math.pow(60, i);\n if (time.length > 3) s += Number(time[3].replace(/[^\\d.]+/g, \"\")) * 24 * 60 * 60;\n return s;\n } else {\n return Number(input.replace(/[^\\d.]+/g, \"\")) || 0;\n }\n}\n/**\n * Parse number from input\n * @param {*} input Any\n * @returns {number}\n */\nexport function parseNumber(input: any): number {\n if (typeof input === \"string\") return Number(input.replace(/[^\\d.]+/g, \"\")) || 0;\n return Number(input) || 0;\n}\n/**\n * Check if the string is an URL\n * @param {string} input input\n * @returns {boolean}\n */\nexport function isURL(input: any): boolean {\n if (typeof input !== \"string\" || input.includes(\" \")) return false;\n try {\n const url = new URL(input);\n if (![\"https:\", \"http:\"].includes(url.protocol) || !url.host) return false;\n } catch {\n return false;\n }\n return true;\n}\n/**\n * Check if the Client has enough intents to using DisTube\n * @param {ClientOptions} options options\n */\nexport function checkIntents(options: ClientOptions): void {\n const requiredIntents: BitFieldResolvable<IntentsString, number>[] = [\"GUILD_VOICE_STATES\"];\n const bitfield: BitFieldResolvable<IntentsString, number> = options.intents ?? (options?.ws as any)?.intents;\n if (typeof bitfield === \"undefined\") return;\n const intents = new Intents(bitfield);\n for (const intent of requiredIntents) {\n if (!intents.has(intent)) throw new DisTubeError(\"MISSING_INTENTS\", intent.toString());\n }\n}\n\n/**\n * Check if the voice channel is empty\n * @param {Discord.VoiceState} voiceState voiceState\n * @returns {boolean}\n */\nexport function isVoiceChannelEmpty(voiceState: VoiceState): boolean {\n const voiceChannel = voiceState.guild?.me?.voice?.channel;\n if (!voiceChannel) return false;\n const members = voiceChannel.members.filter(m => !m.user.bot);\n return !members.size;\n}\n\nexport function isSnowflake(id: any): id is Snowflake {\n try {\n return SnowflakeUtil.deconstruct(id).timestamp > SnowflakeUtil.EPOCH;\n } catch {\n return false;\n }\n}\n\nexport function isMemberInstance(member: any): member is GuildMember {\n return (\n !!member &&\n isSnowflake(member.id) &&\n isSnowflake(member.guild?.id) &&\n isSnowflake(member.user?.id) &&\n member.id === member.user.id\n );\n}\n\nexport function isTextChannelInstance(channel: any): channel is TextChannel {\n return (\n !!channel &&\n isSnowflake(channel.id) &&\n isSnowflake(channel.guild?.id) &&\n typeof channel.send === \"function\" &&\n typeof channel.awaitMessages === \"function\"\n );\n}\n\nexport function isMessageInstance(message: any): message is Message {\n // Simple check for using distube normally\n return (\n !!message &&\n isSnowflake(message.id) &&\n isSnowflake(message.guild?.id) &&\n isTextChannelInstance(message.channel) &&\n isMemberInstance(message.member) &&\n isSnowflake(message.author?.id) &&\n message.member.id === message.author.id &&\n message.guild.id === message.channel.guild.id\n );\n}\n\nexport function isSupportedVoiceChannel(channel: any): channel is VoiceChannel | StageChannel {\n return (\n !!channel &&\n channel.deleted === false &&\n isSnowflake(channel.id) &&\n isSnowflake(channel.guild?.id) &&\n typeof channel.full === \"boolean\" &&\n [\n // Djs v12\n \"voice\",\n \"stage\",\n // Djs v13\n \"GUILD_VOICE\",\n \"GUILD_STAGE_VOICE\",\n ].includes(channel.type)\n );\n}\n\nexport function isGuildInstance(guild: any): guild is Guild {\n return !!guild && isSnowflake(guild.id) && typeof guild.fetchAuditLogs === \"function\";\n}\n\nexport function resolveGuildID(resolvable: GuildIDResolvable): Snowflake {\n let guildID: string | undefined;\n if (typeof resolvable === \"string\") {\n guildID = resolvable;\n } else if (typeof resolvable === \"object\") {\n if (resolvable instanceof Queue || resolvable instanceof DisTubeVoice) guildID = resolvable.id;\n else if (\"guild\" in resolvable && isGuildInstance(resolvable.guild)) guildID = resolvable.guild.id;\n else if (\"id\" in resolvable && isGuildInstance(resolvable)) guildID = resolvable.id;\n }\n if (!isSnowflake(guildID)) throw new DisTubeError(\"INVALID_TYPE\", \"GuildIDResolvable\", resolvable);\n return guildID;\n}\n\nexport function isClientInstance(client: any): client is Client {\n return !!client && typeof client.login === \"function\";\n}\n\nexport function checkInvalidKey(\n target: Record<string, any>,\n source: Record<string, any> | string[],\n sourceName: string,\n) {\n if (typeof target !== \"object\" || Array.isArray(target)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"object\", target, sourceName);\n }\n const sourceKeys = Array.isArray(source) ? source : Object.keys(source);\n const invalidKey = Object.keys(target).find(key => !sourceKeys.includes(key));\n if (invalidKey) throw new DisTubeError(\"INVALID_KEY\", sourceName, invalidKey);\n}\n"]}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAC1B,wBAAsD;AACtD,2CAAoD;AAmBpD,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEhE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,GAAW;IACxC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IACrC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;IACxF,IAAI,OAAO,GAAG,CAAC;QAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;IACtE,OAAO,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;AACpC,CAAC;AARD,wCAQC;AACD;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,KAAU;IACjC,IAAI,CAAC,KAAK;QAAE,OAAO,CAAC,CAAC;IACrB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,KAAK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EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,kBAAkB,MAAM,WAAW,OAAO,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YAC7G,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC7B,OAAO,GAAG,GAAG,EAAE;gBACb,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtB,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC5B,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC9B,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;KACf;YAAS;QACR,OAAO,EAAE,CAAC;KACX;AACH,CAAC;AAEM,KAAK,UAAU,WAAW,CAC/B,MAAS,EACT,MAA6E,EAC7E,OAAe;IAEf,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IAClD,OAAO,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAe,CAAC;AAC1D,CAAC;AAPD,kCAOC","sourcesContent":["import { URL } from \"url\";\nimport { DisTubeError, DisTubeVoice, Queue } from \".\";\nimport { Intents, SnowflakeUtil } from \"discord.js\";\nimport type { GuildIDResolvable } from \".\";\nimport type { EventEmitter } from \"node:events\";\nimport type { AudioPlayer, AudioPlayerStatus, VoiceConnection, VoiceConnectionStatus } from \"@discordjs/voice\";\nimport type {\n BitFieldResolvable,\n Client,\n ClientOptions,\n Guild,\n GuildMember,\n IntentsString,\n Message,\n Snowflake,\n StageChannel,\n TextChannel,\n VoiceChannel,\n VoiceState,\n} from \"discord.js\";\n\nconst formatInt = (int: number) => (int < 10 ? `0${int}` : int);\n\n/**\n * Format duration to string\n * @param {number} sec Duration in seconds\n * @returns {string}\n */\nexport function formatDuration(sec: number): string {\n if (!sec || !Number(sec)) return \"00:00\";\n const seconds = Math.round(sec % 60);\n const minutes = Math.floor((sec % 3600) / 60);\n const hours = Math.floor(sec / 3600);\n if (hours > 0) return `${formatInt(hours)}:${formatInt(minutes)}:${formatInt(seconds)}`;\n if (minutes > 0) return `${formatInt(minutes)}:${formatInt(seconds)}`;\n return `00:${formatInt(seconds)}`;\n}\n/**\n * Convert formatted duration to seconds\n * @param {*} input Formatted duration string\n * @returns {number}\n */\nexport function toSecond(input: any): number {\n if (!input) return 0;\n if (typeof input !== \"string\") return Number(input) || 0;\n if (input.match(/:/g)) {\n const time = input.split(\":\").reverse();\n let s = 0;\n for (let i = 0; i < 3; i++) if (time[i]) s += Number(time[i].replace(/[^\\d.]+/g, \"\")) * Math.pow(60, i);\n if (time.length > 3) s += Number(time[3].replace(/[^\\d.]+/g, \"\")) * 24 * 60 * 60;\n return s;\n } else {\n return Number(input.replace(/[^\\d.]+/g, \"\")) || 0;\n }\n}\n/**\n * Parse number from input\n * @param {*} input Any\n * @returns {number}\n */\nexport function parseNumber(input: any): number {\n if (typeof input === \"string\") return Number(input.replace(/[^\\d.]+/g, \"\")) || 0;\n return Number(input) || 0;\n}\n/**\n * Check if the string is an URL\n * @param {string} input input\n * @returns {boolean}\n */\nexport function isURL(input: any): boolean {\n if (typeof input !== \"string\" || input.includes(\" \")) return false;\n try {\n const url = new URL(input);\n if (![\"https:\", \"http:\"].includes(url.protocol) || !url.host) return false;\n } catch {\n return false;\n }\n return true;\n}\n/**\n * Check if the Client has enough intents to using DisTube\n * @param {ClientOptions} options options\n */\nexport function checkIntents(options: ClientOptions): void {\n const requiredIntents: BitFieldResolvable<IntentsString, number>[] = [\"GUILD_VOICE_STATES\"];\n const bitfield: BitFieldResolvable<IntentsString, number> = options.intents ?? (options?.ws as any)?.intents;\n if (typeof bitfield === \"undefined\") return;\n const intents = new Intents(bitfield);\n for (const intent of requiredIntents) {\n if (!intents.has(intent)) throw new DisTubeError(\"MISSING_INTENTS\", intent.toString());\n }\n}\n\n/**\n * Check if the voice channel is empty\n * @param {Discord.VoiceState} voiceState voiceState\n * @returns {boolean}\n */\nexport function isVoiceChannelEmpty(voiceState: VoiceState): boolean {\n const voiceChannel = voiceState.guild?.me?.voice?.channel;\n if (!voiceChannel) return false;\n const members = voiceChannel.members.filter(m => !m.user.bot);\n return !members.size;\n}\n\nexport function isSnowflake(id: any): id is Snowflake {\n try {\n return SnowflakeUtil.deconstruct(id).timestamp > SnowflakeUtil.EPOCH;\n } catch {\n return false;\n }\n}\n\nexport function isMemberInstance(member: any): member is GuildMember {\n return (\n !!member &&\n isSnowflake(member.id) &&\n isSnowflake(member.guild?.id) &&\n isSnowflake(member.user?.id) &&\n member.id === member.user.id\n );\n}\n\nexport function isTextChannelInstance(channel: any): channel is TextChannel {\n return (\n !!channel &&\n isSnowflake(channel.id) &&\n isSnowflake(channel.guild?.id) &&\n typeof channel.send === \"function\" &&\n typeof channel.awaitMessages === \"function\"\n );\n}\n\nexport function isMessageInstance(message: any): message is Message {\n // Simple check for using distube normally\n return (\n !!message &&\n isSnowflake(message.id) &&\n isSnowflake(message.guild?.id) &&\n isTextChannelInstance(message.channel) &&\n isMemberInstance(message.member) &&\n isSnowflake(message.author?.id) &&\n message.member.id === message.author.id &&\n message.guild.id === message.channel.guild.id\n );\n}\n\nexport function isSupportedVoiceChannel(channel: any): channel is VoiceChannel | StageChannel {\n return (\n !!channel &&\n typeof channel.joinable === \"boolean\" &&\n isSnowflake(channel.id) &&\n isSnowflake(channel.guild?.id) &&\n typeof channel.full === \"boolean\" &&\n [\n // Djs v12\n \"voice\",\n \"stage\",\n // Djs v13\n \"GUILD_VOICE\",\n \"GUILD_STAGE_VOICE\",\n ].includes(channel.type)\n );\n}\n\nexport function isGuildInstance(guild: any): guild is Guild {\n return !!guild && isSnowflake(guild.id) && typeof guild.fetchAuditLogs === \"function\";\n}\n\nexport function resolveGuildID(resolvable: GuildIDResolvable): Snowflake {\n let guildID: string | undefined;\n if (typeof resolvable === \"string\") {\n guildID = resolvable;\n } else if (typeof resolvable === \"object\") {\n if (resolvable instanceof Queue || resolvable instanceof DisTubeVoice) guildID = resolvable.id;\n else if (\"guild\" in resolvable && isGuildInstance(resolvable.guild)) guildID = resolvable.guild.id;\n else if (\"id\" in resolvable && isGuildInstance(resolvable)) guildID = resolvable.id;\n }\n if (!isSnowflake(guildID)) throw new DisTubeError(\"INVALID_TYPE\", \"GuildIDResolvable\", resolvable);\n return guildID;\n}\n\nexport function isClientInstance(client: any): client is Client {\n return !!client && typeof client.login === \"function\";\n}\n\nexport function checkInvalidKey(\n target: Record<string, any>,\n source: Record<string, any> | string[],\n sourceName: string,\n) {\n if (typeof target !== \"object\" || Array.isArray(target)) {\n throw new DisTubeError(\"INVALID_TYPE\", \"object\", target, sourceName);\n }\n const sourceKeys = Array.isArray(source) ? source : Object.keys(source);\n const invalidKey = Object.keys(target).find(key => !sourceKeys.includes(key));\n if (invalidKey) throw new DisTubeError(\"INVALID_KEY\", sourceName, invalidKey);\n}\n\nasync function waitEvent(target: EventEmitter, status: string, maxTime: number) {\n let cleanup = () => undefined as any;\n try {\n await new Promise((resolve, reject) => {\n const timeout = setTimeout(() => reject(new Error(`Didn't trigger ${status} within ${maxTime}ms`)), maxTime);\n target.once(status, resolve);\n target.once(\"error\", reject);\n cleanup = () => {\n clearTimeout(timeout);\n target.off(status, resolve);\n target.off(\"error\", reject);\n };\n });\n return target;\n } finally {\n cleanup();\n }\n}\n\nexport async function entersState<T extends VoiceConnection | AudioPlayer>(\n target: T,\n status: T extends VoiceConnection ? VoiceConnectionStatus : AudioPlayerStatus,\n maxTime: number,\n) {\n if (target.state.status === status) return target;\n return waitEvent(target, status, maxTime) as Promise<T>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "distube",
3
- "version": "3.0.2",
3
+ "version": "3.0.6",
4
4
  "description": "A Discord.js module to simplify your music commands and play songs with audio filters on Discord without any API key. Support YouTube, SoundCloud, Bandcamp, Facebook, and 700+ more sites",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -46,42 +46,49 @@
46
46
  "homepage": "https://distube.js.org/",
47
47
  "dependencies": {
48
48
  "@distube/youtube-dl": "^2.2.4",
49
- "@distube/ytdl-core": "^4.9.3",
49
+ "@distube/ytdl-core": "^4.9.4",
50
50
  "@distube/ytpl": "^1.1.1",
51
51
  "@distube/ytsr": "^1.1.5",
52
52
  "prism-media": "https://codeload.github.com/distubejs/prism-media/tar.gz/main",
53
53
  "tiny-typed-emitter": "^2.1.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@babel/core": "^7.16.0",
57
- "@babel/plugin-proposal-class-properties": "^7.16.0",
58
- "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
59
- "@babel/preset-env": "^7.16.0",
60
- "@babel/preset-typescript": "^7.16.0",
61
- "@commitlint/cli": "^14.1.0",
62
- "@commitlint/config-conventional": "^14.1.0",
63
- "@discordjs/voice": "^0.7.2",
56
+ "@babel/core": "^7.16.7",
57
+ "@babel/plugin-proposal-class-properties": "^7.16.7",
58
+ "@babel/plugin-proposal-object-rest-spread": "^7.16.7",
59
+ "@babel/preset-env": "^7.16.7",
60
+ "@babel/preset-typescript": "^7.16.7",
61
+ "@commitlint/cli": "^16.0.1",
62
+ "@commitlint/config-conventional": "^16.0.0",
63
+ "@discordjs/voice": "^0.7.5",
64
64
  "@distube/docgen": "github:distubejs/docgen",
65
- "@types/jest": "^27.0.2",
65
+ "@types/jest": "^27.4.0",
66
66
  "@types/node": "^16.11.7",
67
- "babel-jest": "^27.3.1",
68
- "discord.js": "^13.3.1",
69
- "eslint": "^7.32.0",
70
- "eslint-config-distube": "^1.4.0",
67
+ "@typescript-eslint/eslint-plugin": "^5.9.0",
68
+ "babel-jest": "^27.4.6",
69
+ "discord.js": "^13.5.1",
70
+ "eslint": "^8.6.0",
71
+ "eslint-config-distube": "^1.5.0",
72
+ "eslint-plugin-jsdoc": "^37.5.1",
71
73
  "husky": "^7.0.4",
72
- "jest": "^27.3.1",
74
+ "jest": "^27.4.7",
73
75
  "jsdoc-babel": "^0.5.0",
74
- "lint-staged": "^11.2.6",
75
- "npm-check-updates": "^12.0.2",
76
+ "lint-staged": "^12.1.7",
77
+ "npm-check-updates": "^12.1.0",
76
78
  "pinst": "^2.1.6",
77
- "prettier": "^2.4.1",
78
- "typescript": "^4.4.4"
79
+ "prettier": "^2.5.1",
80
+ "typescript": "^4.5.4"
79
81
  },
80
82
  "peerDependencies": {
81
83
  "@discordjs/opus": "*",
82
84
  "@discordjs/voice": ">=0.5.6",
83
85
  "discord.js": "^12.5.0||13.x"
84
86
  },
87
+ "peerDependenciesMeta": {
88
+ "@discordjs/opus": {
89
+ "optional": true
90
+ }
91
+ },
85
92
  "engines": {
86
93
  "node": ">=12.0.0"
87
94
  }