discord-player
Advanced tools
Comparing version 4.0.5 to 4.0.6
@@ -79,6 +79,7 @@ "use strict"; | ||
this.filters = AudioFilters_1.default; | ||
this.client.on('voiceStateUpdate', (o, n) => void this._handleVoiceStateUpdate(o, n)); | ||
this.client.on('voiceStateUpdate', this._handleVoiceStateUpdate.bind(this)); | ||
// auto detect @discord-player/extractor | ||
if (!this.options.disableAutoRegister) { | ||
let nv; | ||
// tslint:disable:no-conditional-assignment | ||
if ((nv = Util_1.default.require('@discord-player/extractor'))) { | ||
@@ -236,2 +237,3 @@ ['Attachment', 'Facebook', 'Reverbnation', 'Vimeo'].forEach((ext) => void this.use(ext, nv[ext])); | ||
const queue = (yield this._createQueue(message, track).catch((e) => void this.emit(Constants_1.PlayerEvents.ERROR, e, message))); | ||
this.emit(Constants_1.PlayerEvents.PLAYLIST_ADD, message, queue, playlist); | ||
this.emit(Constants_1.PlayerEvents.TRACK_START, message, queue.tracks[0], queue); | ||
@@ -283,2 +285,3 @@ this._addTracksToQueue(message, tracks); | ||
const queue = (yield this._createQueue(message, track).catch((e) => void this.emit(Constants_1.PlayerEvents.ERROR, e, message))); | ||
this.emit(Constants_1.PlayerEvents.PLAYLIST_ADD, message, queue, res); | ||
this.emit(Constants_1.PlayerEvents.TRACK_START, message, queue.tracks[0], queue); | ||
@@ -726,5 +729,5 @@ this._addTracksToQueue(message, res.tracks); | ||
else { | ||
trackFound = queue.tracks.find((s) => s === track); | ||
trackFound = queue.tracks.find((s) => s.url === track.url); | ||
if (trackFound) { | ||
queue.tracks = queue.tracks.filter((s) => s !== trackFound); | ||
queue.tracks = queue.tracks.filter((s) => s.url !== trackFound.url); | ||
} | ||
@@ -777,4 +780,4 @@ } | ||
const index = Math.round((currentStreamTime / totalTime) * length); | ||
const indicator = '🔘'; | ||
const line = '▬'; | ||
const indicator = typeof (options === null || options === void 0 ? void 0 : options.indicator) === 'string' && (options === null || options === void 0 ? void 0 : options.indicator.length) > 0 ? options === null || options === void 0 ? void 0 : options.indicator : '🔘'; | ||
const line = typeof (options === null || options === void 0 ? void 0 : options.line) === 'string' && (options === null || options === void 0 ? void 0 : options.line.length) > 0 ? options === null || options === void 0 ? void 0 : options.line : '▬'; | ||
if (index >= 1 && index <= length) { | ||
@@ -781,0 +784,0 @@ const bar = line.repeat(length - 1).split(''); |
@@ -80,2 +80,4 @@ /// <reference types="node" /> | ||
length?: number; | ||
line?: string; | ||
indicator?: string; | ||
} | ||
@@ -82,0 +84,0 @@ export interface LyricsData { |
{ | ||
"name": "discord-player", | ||
"version": "4.0.5", | ||
"version": "4.0.6", | ||
"description": "Complete framework to facilitate music commands using discord.js", | ||
@@ -53,7 +53,7 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"discord-ytdl-core": "^5.0.2", | ||
"discord-ytdl-core": "^5.0.3", | ||
"soundcloud-scraper": "^4.0.3", | ||
"spotify-url-info": "^2.2.0", | ||
"youtube-sr": "^4.0.4", | ||
"ytdl-core": "^4.5.0" | ||
"youtube-sr": "^4.0.6", | ||
"ytdl-core": "^4.7.0" | ||
}, | ||
@@ -60,0 +60,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
124461
2990
0
Updateddiscord-ytdl-core@^5.0.3
Updatedyoutube-sr@^4.0.6
Updatedytdl-core@^4.7.0