Releases: Androz2091/discord-player
7.1.0
What's Changed
- feat: stream interceptors api by @twlite docs https://discord-player.js.org/docs/intercepting-streams/intercepting-audio-resource-stream
- bump version of botanique by @Mylloon in #1956
- fix(Player): handle null metadata by @twlite in #1958
- add tts ext by @iTsMaaT in #1960
Full Changelog: v7.0.0...v7.1.0
7.0.0
See https://discord-player.js.org/docs/migrating/migrating_to_v7 for migration guide.
@discord-player/[email protected]
What's Changed
- Fix Youtube bridge query issue using url instead of creating string by @mariusbegby in #1929
- Fix: Type mismatch in the .raw property by @retrouser955 in #1930
Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]...@discord-player/[email protected]
[email protected]
What's Changed
- fix(queue): add check for null on bridge property by @Kamiloo13 in #1925
- fix(IPRotator): require manual ip package installation
New Contributors
- @Kamiloo13 made their first contribution in #1925
Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]@6.7.1
[email protected]
What's Changed
- Update description & version for discord-player-bot in showcase by @LackyPal in #1915
- feat!: v7 rewrite by @twlite in #1916
Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]@6.7.0
@discord-player/[email protected]
What's Changed
- Update description & version for discord-player-bot in showcase by @LackyPal in #1915
- feat!: v7 rewrite by @twlite in #1916
Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]...@discord-player/[email protected]
[email protected]
What's Changed
- Fix: update @web-scrobbler/metadata-filter to deps by @retrouser955 in #1911
Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]@6.6.10
[email protected]
New Features
- New lyrics API and synced lyrics feature is now stable
- Track now contains
cleanTitle
property which removes junk from track titles.
New lyrics API
// other methods include .get() .getById() etc.
const results = await player.lyrics.search({ q: track }); // this is a lot better than genius, if you want to search by current track - use track.cleanTitle as the query and specify artistName as well in such situations
// player.lyrics also takes care of ratelimits so you will not get ratelimited
const lyrics= results[0];
if (!lyrics.syncedLyrics) {
return // no synced lyrics available
}
// load lyrics
const syncedLyrics = queue.syncedLyrics(lyrics);
syncedLyrics.at(timestampInMilliseconds); // manually get a line at specific timestamp. Discord Player resolves closest timestamp
// Synchronize lyrics with the queue
syncedLyrics.onChange(async (lyrics, timestamp) => {
// timestamp = timestamp in lyrics (not queue's time)
// lyrics = line in that timestamp
await interaction.channel?.send({
content: `[${timestamp}]: ${lyrics}`
});
});
const unsubscribe = syncedLyrics.subscribe(); // start watching the queue for live updates
unsubscribe(); // call this when you are done, discord-player does this automatically when track ends
What's Changed
- fix: do not emit audioTrackRemove event upon jumping to a track by @mateie in #1898
- Update showcase.ts by @LakhindarPal in #1899
- Add "Controlling the player behavior" to Common Actions by @febkosq8 in #1901
- Docs : Update links from old discord.js docs to new one by @febkosq8 in #1902
- Implement yt-stream cookie by @retrouser955 in #1903
- added discord-player-tidal extractor to showcase by @LakhindarPal in #1906
- Update showcase for Elite Music by @ThatGuyJacobee in #1907
- Implement clean title property for youtube videos by @retrouser955 in #1908
- fix: check dispatcher before attempting to play a stream (#1909)
- fix: wrap intent checker in try..catch and warn if client instance looks malformed
New Contributors
- @mateie made their first contribution in #1898
- @LakhindarPal made their first contribution in #1899
Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]@6.6.9
[email protected]
New hooks api
Good to know: Previous hooks api is still valid and works as expected.
Previously, hooks required you to pass guild/id as an argument which is expressed as:
const queue = useQueue(interaction.guild.id);
With the new update, there is another method of using hooks, which does not require you to pass guild/id as an argument. In other words, the following code will automatically get the correct queue.
const queue = useQueue();
In order to use this method for hooks, you will need to update your command handler to execute your command with hooks context, which can be written as:
// assuming the following is our command to be executed
const command = getCommandToExecute();
// we would normally execute it as
await command.execute(interaction);
// instead, we have to use the following
const ctx = { guild: interaction.guild };
await player.context.provide(ctx, () => command.execute(interaction));
This would allow every command to use discord-player hooks without having to specify guild/id.
Why is this necessary?
Lets say you have a command and it calls utility function(s) and that utility function also requires access to discord-player data. You'd normally pass it down through arguments over and over again until it reaches the destination. But with this api, you do not need to pass it down via arguments. It will be directly available to the destination.
Changelog
- feat: add async context api for hooks by @twlite in #1893
- Now player can search on m.youtube.com (#1891) by @takejohn in #1894
New Contributors
Full Changelog: https://github.com/Androz2091/discord-player/compare/@discord-player/[email protected]@6.6.8
@discord-player/[email protected]
What's Changed
- Update showcase - Jappan version by @febkosq8 in #1884
- feat: add muusik.app by @JayXTQ in #1887
- Fix play-dl cookie setting error by @BernardoPe in #1892
New Contributors
- @JayXTQ made their first contribution in #1887
- @BernardoPe made their first contribution in #1892
Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]...@discord-player/[email protected]