Releases: Androz2091/discord-player
5.3.1
What's Changed
- fix(AudioFilters): properly get filters by @DevAndromeda in #1287
- fix(Queue): shuffle all tracks by @mjh316 in #1286
Full Changelog: v5.3.0...v5.3.1
5.3.0
5.2.2
Updates
- 💉Try auto
smoothVolume
injection on startup - 🦥Lazily create voice connection
- 🔨Check voice intents properly
Full Changelog: v5.2.1...v5.2.2
5.2.1
What's Changed
- docs(Track): add missing playlist property by @LePtitMetalleux in #968
- feat: smooth volume transition by @DevAndromeda in #1017
Full Changelog: v5.2.0...v5.2.1
5.2.0 Publish
Publish release
5.2.0
Features
- feat(Queue): add
onBeforeCreateStream
toQueue
instance and queue init options- See below for example.
- feat(Queue): add
skipTo
method (751ce12)- Skips to the given position in the queue.
- feat(Queue): add
spotifyBridge
option (edb517c)- This option is by default enabled and it basically resolves spotify tracks from youtube automatically. You can disable this by using
spotifyBridge: false
oncreateQueue
options
- This option is by default enabled and it basically resolves spotify tracks from youtube automatically. You can disable this by using
- feat(Queue): add
disableVolume
option (87d49c6)- Player volume controls are available on-the-fly by default. If you don't need this, you can disable volume controls by simply passing
disableVolume: true
oncreateQueue
options
- Player volume controls are available on-the-fly by default. If you don't need this, you can disable volume controls by simply passing
- feat(Queue): handle error events by default (3185557)
- This will by default emit a warning and log the error if there are no error listeners registered.
Fixes
- fix(VoiceConnection): handle voice connection destroy error (#789)
- fix(Track): fix toJSON causing errors (ad9212c)
- fix(Queue): watch destroyed state for insert method (1c9a00b)
Queue.onBeforeCreateStream
This method traps the stream downloader. This is not related to extractors api though, since it can bypass those. This could also be used to block certain source like youtube
. You can disable spotifyBridge
to block spotify<->youtube
bridge.
Note: this method may not work properly if
spotifyBridge
is enabled.
Discord Player won't switch to anything else from
ytdl-core
at the moment.
const playdl = require("play-dl");
// other code
const queue = player.createQueue(..., {
...,,
spotifyBridge: false, // set this to true if you need spotify<->youtube bridge.
// setting the bridge to true (which is set to true by default) sets the source to "youtube" for onBeforeCreateStream
async onBeforeCreateStream(track, source, _queue) {
// only trap youtube source
if (source === "youtube") {
// track here would be youtube track
return (await playdl.stream(track.url)).stream;
// we must return readable stream or void (returning void means telling discord-player to look for default extractor)
} else if (source === "spotify") { // trap spotify
// resolve spotify stream here
}
}
});
Changelog
- chore(deps-dev): bump husky from 7.0.1 to 7.0.2 by @dependabot in #732
- chore(deps-dev): bump @typescript-eslint/parser from 4.29.2 to 4.29.3 by @dependabot in #730
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 4.29.2 to 4.29.3 by @dependabot in #729
- fix(Queue): fix jump by @Samiul30 in #738
- chore(deps-dev): bump typescript from 4.3.5 to 4.4.2 by @dependabot in #737
- chore(deps-dev): bump @types/node from 16.7.1 to 16.7.2 by @dependabot in #735
- chore(deps-dev): bump @types/node from 16.7.2 to 16.7.6 by @dependabot in #748
- chore(deps-dev): bump @babel/cli from 7.14.8 to 7.15.4 by @dependabot in #757
- chore(deps-dev): bump @babel/core from 7.15.0 to 7.15.4 by @dependabot in #756
- chore(deps-dev): bump @types/node from 16.7.6 to 16.7.10 by @dependabot in #754
- chore(deps): bump tar from 6.1.6 to 6.1.11 by @dependabot in #753
- chore(deps-dev): bump @typescript-eslint/parser from 4.29.3 to 4.30.0 by @dependabot in #751
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 4.29.3 to 4.30.0 by @dependabot in #749
- chore(deps-dev): bump @babel/preset-env from 7.15.0 to 7.15.4 by @dependabot in #755
- chore(deps-dev): bump @babel/core from 7.15.4 to 7.15.5 by @dependabot in #762
- chore(deps-dev): bump @types/node from 16.7.10 to 16.7.12 by @dependabot in #768
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 4.30.0 to 4.31.0 by @dependabot in #767
- chore(deps-dev): bump @typescript-eslint/parser from 4.30.0 to 4.31.0 by @dependabot in #766
- chore(deps-dev): bump typescript from 4.4.2 to 4.4.3 by @dependabot in #776
- chore(deps-dev): bump prettier from 2.3.2 to 2.4.0 by @dependabot in #773
- chore(deps-dev): bump @types/node from 16.7.12 to 16.9.1 by @dependabot in #775
- chore(deps-dev): bump discord-api-types from 0.22.0 to 0.23.1 by @dependabot in #771
- chore(deps-dev): bump @babel/preset-env from 7.15.4 to 7.15.6 by @dependabot in #774
- fix(Player): don't change connection channel when random user joins by @HKGx in #778
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 4.31.0 to 4.31.1 by @dependabot in #779
- chore(deps-dev): bump @typescript-eslint/parser from 4.31.0 to 4.31.1 by @dependabot in #780
- chore(deps-dev): bump prettier from 2.4.0 to 2.4.1 by @dependabot in #785
- chore(deps-dev): bump @types/node from 16.9.1 to 16.9.2 by @dependabot in #786
- chore(deps-dev): bump @babel/cli from 7.15.4 to 7.15.7 by @dependabot in #792
- chore(deps-dev): bump @types/node from 16.9.2 to 16.9.4 by @dependabot in #791
- chore(deps): bump nth-check from 2.0.0 to 2.0.1 by @dependabot in #801
- chore(deps-dev): bump gen-esm-wrapper from 1.1.2 to 1.1.3 by @dependabot in #800
- chore(deps-dev): bump @types/node from 16.9.4 to 16.9.6 by @dependabot in #799
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 4.31.1 to 4.31.2 by @dependabot in #798
- chore(deps-dev): bump @typescript-eslint/parser from 4.31.1 to 4.31.2 by @dependabot in #797
- chore(deps): bump axios from 0.21.1 to 0.21.4 by @dependabot in #802
- fix: connection destroy error by @LOLBRUHNICE in #789
- chore(deps-dev): bump @typescript-eslint/parser from 4.31.2 to 4.32.0 by @dependabot in #820
- chore(deps-dev): bump @typescript-eslint/eslint-plugin from 4.31.2 to 4.32.0 by @dependabot in #819
- chore(deps-dev): bump @types/ws from 7.4.7 to 8.2.0 by @dependabot in #816
- chore(deps-dev): bump @types/node from 16.9.6 to 16.10.1 by @dependabot in #815
- chore(deps-dev): bump @types/node from 16.10.1 to 16.10.2 by @dependabot in #823
- chore(deps-dev): bump @favware/rollup-type-bundler from 1.0.3 to 1.0.4 by @dependabot in #827
- Pass ytdlOptions for ytdlGetInfo by @umutdeveci in #844
- Fix AUTOPLAY by @EwoX07 in #850
- Fix _handleVoiceState by @EwoX07 in #852
- 🎵 add musico as an example by @Whirl21 in #864
- add Dodong to list of example bots by @nizeic in #875
- Added Eyesense-Music-Bot as an example! by @naseif in #888
- dev updates by @DevAndromeda in #806
New Contributors
- @Samiul30 made their first contribution in #738
- @HKGx made their first contribution in #778
- @LOLBRUHNICE made their first contribution in #789
- @umutdeveci made their first contribution in #844
- @EwoX07 made their first contribution in #850
- @Whirl21 made their first contribution in #864
- @nizeic made their first contribution in #875
- @naseif made their first contribution in #888
...
5.1.0
Breaking
- Remove useless mute/unmute methods on Queue. (6439590)
Queue.setVolume()
method should now be used instead.
Added
- Add source info to extractor model. (53d711b)
Fixed
- Fix soundcloud tracks. (6d9d427)
- Fix volume (set it before playing). (731e309)
- Fix bugs with the
jump()
method. (8a46d12, 2344265) - Fix autoplay error on stop call. (0617829)
- Fix
leaveOnEmpty
option. (2fc1089) - Check connection before playing. (edc54bb)
- Check if resource has ended before playing. (dd91244)
- Fix some bugs with the examples. (6799ff1, 90416d7, 614642c, 906aaf8, 8e83a2d, 5e84bd1, 6f0909b, b823583, cb1b95d)
Credits
Thanks to @DevAndromeda, @joshuayuen99, @aiko-chan-ai, @Yan-Jobs, @ConnorDoesDev, @Klairm for their help!
5.0.2
5.0.1
5.0.0
This version of discord-player has been rewritten using @discordjs/voice, for better performance. It also now supports Discord.js v13 and Slash Commands. An important part of the core of discord-player has been rebuilt and this leads to many breaking changes. This is something we can't escape if we want to add major improvements to the library.
Thank you for using discord-player, we look forward to your feedback! If you have any questions, feel free to join our Discord server.
Breaking ⚠️
- Discord.js v13 is required.
- Node.js v16 is required.
- All the methods are no longer based on message
ytdlDownloadOptions
has been renamed toytdlOptions
.- Most of the options from Player class has been moved to Queue.
- All the event parameters have been changed.
- Provides cleaner API
- ESM support
- Each player methods are now handled by individual queues
- leaveOnEndCooldown option has been removed
- leaveOnStopCooldown option has been removed
Added
- New metadata option to all the Queue instances
- New initialVolume option to all the Queue instances
- New bufferingTimeout option for Player
- New connectionTimeout option for voice connections
- New audio filters
- Support for Slash Commands (/)
- Support for Stage channels
- New Playlist structure
Improved
- Better error handling
- Better tracks search
- Better voice state handling
- Better queue management
Thanks to @DevAndromeda for this release! ❤️