Discord Player Versions Save

🎧 Complete framework to simplify the implementation of music commands using discord.js v14

[email protected]

1 month ago

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]

1 month ago

What's Changed

New Contributors

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

[email protected]

4 months ago

What's Changed

New Contributors

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

@discord-player/[email protected]

4 months ago

[email protected]

6 months ago

What's Changed

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

[email protected]

6 months ago

What's Changed

New Contributors

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

@discord-player/[email protected]

6 months ago

What's Changed

New Contributors

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

[email protected]

8 months ago

What's Changed

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

@discord-player/[email protected]

8 months ago

Changes

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

@discord-player/[email protected]

8 months ago

Changes

  • fix(FiltersChainBuilder): conditionally initialize filters