Skip to content

Releases: Androz2091/discord-player

discord-player@6.6.9

23 May 17:55
Compare
Choose a tag to compare

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

Full Changelog: https://github.com/Androz2091/discord-player/compare/discord-player@6.6.8...discord-player@6.6.9

discord-player@6.6.8

01 Apr 17:44
Compare
Choose a tag to compare

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

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

28 Mar 20:18
Compare
Choose a tag to compare

What's Changed

New Contributors

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

10 Jan 08:47
Compare
Choose a tag to compare

What's Changed

New Contributors

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

10 Jan 08:46
Compare
Choose a tag to compare

discord-player@6.6.6

26 Oct 13:08
Compare
Choose a tag to compare

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

25 Oct 07:16
Compare
Choose a tag to compare

What's Changed

New Contributors

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

25 Oct 07:14
Compare
Choose a tag to compare

What's Changed

New Contributors

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

16 Sep 15:09
Compare
Choose a tag to compare

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

16 Sep 15:08
Compare
Choose a tag to compare

Changes

  • fix(SoundCloudExtractor): filter out preview tracks from search results