Skip to content

Releases: Androz2091/discord-player

@discord-player/[email protected]

11 Aug 08:54
5760b85
Compare
Choose a tag to compare

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]...@discord-player/[email protected]

[email protected]

31 Jul 03:52
Compare
Choose a tag to compare

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

Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]@6.7.1

[email protected]

20 Jul 13:48
3166945
Compare
Choose a tag to compare

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]@6.7.0

@discord-player/[email protected]

20 Jul 13:48
3166945
Compare
Choose a tag to compare

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]...@discord-player/[email protected]

[email protected]

09 Jun 11:51
Compare
Choose a tag to compare

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]@6.6.10

[email protected]

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/[email protected]@6.6.9

[email protected]

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/[email protected]@6.6.8

@discord-player/[email protected]

28 Mar 20:18
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]...@discord-player/[email protected]

[email protected]

10 Jan 08:47
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/Androz2091/discord-player/compare/[email protected]@6.6.7

@discord-player/[email protected]

10 Jan 08:46
Compare
Choose a tag to compare