Releases: Androz2091/discord-player
discord-player@6.6.9
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/discord-player@6.6.8...discord-player@6.6.9
discord-player@6.6.8
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/extractor@4.4.7...discord-player@6.6.8
@discord-player/extractor@4.4.7
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/discord-player@6.6.7...@discord-player/extractor@4.4.7
discord-player@6.6.7
What's Changed
- chore: update FUNDING by @twlite in #1858
- perf: remove unnecessary bridgeProvider check by @Rizina in #1859
- fix: handle eslint failure by @Rizina in #1861
- fix(GuildQueue): fix post-play handler by @twlite in #1860
- feat: added search functionality to website by @Botseer in #1862
- feat(BaseExtractor): add protocols support by @twlite in #1863
- docs: add protocol example in guide by @twlite in #1864
- docs: add supported protocols list in guide by @twlite in #1865
- feat: added debounced to search and cleaned the UI by @FroostyCodes in #1867
- docs: add music-bot to showcase by @twlite in #1872
- docs: update instructions for showcase by @twlite in #1873
- refactor: update website by @twlite in #1876
- fix: responsive footer by @twlite in #1877
- Update Cadence description in showcase by @mariusbegby in #1881
- docs: Update community bot Music-Disc version by @hmes98318 in #1882
New Contributors
- @Rizina made their first contribution in #1859
- @Botseer made their first contribution in #1862
- @FroostyCodes made their first contribution in #1867
Full Changelog: https://github.com/Androz2091/discord-player/compare/discord-player@6.6.6...discord-player@6.6.7
@discord-player/extractor@4.4.6
What's Changed
Full Changelog: https://github.com/Androz2091/discord-player/compare/discord-player@6.6.6...@discord-player/extractor@4.4.6
discord-player@6.6.6
What's Changed
- docs: add serialization and deserializaiton guide by @twlite in #1851
- chore: migrate to yarn v4 by @twlite in #1853
- fix(GuildQueuePlayerNode): use @discord-player/opus by @twlite in #1854
Full Changelog: https://github.com/Androz2091/discord-player/compare/@discord-player/extractor@4.4.5...discord-player@6.6.6
discord-player@6.6.5
What's Changed
- Update Cadence discord-player version by @mariusbegby in #1810
- bump version of botanique by @Mylloon in #1811
- fix: solve pauseOnEmpty not working without debugger by @mariusbegby in #1812
- docs(resource): add Elite Music bot to the showcase by @ThatGuyJacobee in #1822
- feat: add serialization and deserialization methods by @twlite in #1823
- fix(serde): remove $ from SerializedType value by @twlite in #1824
- fix(hooks): throw on illegal useMainPlayer invocation by @twlite in #1826
- feat(GuildQueuePlayerNode): implement demuxer by @twlite in #1827
- fix(QueryResolver): follow known redirect uri by @twlite in #1828
- feat(GuildQueue): add track skip reason, remove skipOnNoStream by @twlite in #1829
- update bhop music bot's version by @akanora in #1830
- fix(QueryResolver): update apple music playlist regex by @twlite in #1831
- fix(Player): enable demuxer optimization by default by @twlite in #1834
- docs: update ip rotation guide page by @twlite in #1835
- fix(AFilterGraph): expose current biquad filter by @twlite in #1836
- perf: optimize debug logs by @twlite in #1840
- fix(QueryResolver): resolve spotify redirects by @twlite in #1841
- feat: add dynamic shuffle mode by @twlite in #1842
- feat: add bindHook function by @twlite in #1846
- feat(ExtractorExecutionContext): allow passing options via loadDefault by @twlite in #1847
- Update showcase.ts by @ToothlessBrush in #1848
- feat(BaseExtractor): add priority by @twlite in #1849
- docs: generate documentation by @twlite in #1850
New Contributors
- @ThatGuyJacobee made their first contribution in #1822
- @akanora made their first contribution in #1830
- @notunderctrl made their first contribution in #1838
- @ToothlessBrush made their first contribution in #1848
Full Changelog: https://github.com/Androz2091/discord-player/compare/@discord-player/equalizer@0.2.3...discord-player@6.6.5
@discord-player/extractor@4.4.5
What's Changed
- fix(helper): fix play-dl setToken by @abish-desu in #1819
- fix(AttachmentExtractor): set probe timeout by @twlite in #1832
- fix(BridgeProvider): add demuxer support by @twlite in #1833
- export
BridgedExtractor
by @notunderctrl in #1838 - feat(YoutubeExtractor): add mixes support by @twlite in #1843
New Contributors
- @notunderctrl made their first contribution in #1838
Full Changelog: https://github.com/Androz2091/discord-player/compare/@discord-player/equalizer@0.2.3...@discord-player/extractor@4.4.5
discord-player@6.6.4
What's Changed
- fix(QueryResolver): fix youtube playlists resolver
- feat(GuildQueue): ability to properly disable filters
- update Mirasaki Music Bot version by @Mirasaki in #1806
- docs: update Mittelbot showcase version & description by @Mittelblut9 in #1807
Full Changelog: https://github.com/Androz2091/discord-player/compare/@discord-player/extractor@4.4.3...discord-player@6.6.4
@discord-player/extractor@4.4.4
Changes
- fix(SoundCloudExtractor): filter out preview tracks from search results