Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency discord-player to v6.7.1 #286

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jul 20, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
discord-player (source) 6.6.2 -> 6.7.1 age adoption passing confidence

Release Notes

Androz2091/discord-player (discord-player)

v6.7.1

Compare Source

What's Changed

New Contributors

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

v6.7.0

Compare Source

What's Changed

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

v6.6.10

Compare Source

What's Changed

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

v6.6.9

Compare Source

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

New Contributors

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

v6.6.8

Compare Source

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](https://togithub.com/discord-player/extractor)[@​4](https://togithub.com/4)[email protected]

v6.6.7

Compare Source

What's Changed

New Contributors

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

v6.6.6

Compare Source

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[@​discord-player/extractor](https://togithub.com/discord-player/extractor)[@​4](https://togithub.com/4)[email protected]

v6.6.5

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/Androz2091/discord-player/compare/[@​discord-player/equalizer](https://togithub.com/discord-player/equalizer)[@​0](https://togithub.com/0)[email protected]

v6.6.4

Compare Source

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[@​discord-player/extractor](https://togithub.com/discord-player/extractor)[@​4](https://togithub.com/4)[email protected]

v6.6.3

Compare Source

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[@​discord-player/opus](https://togithub.com/discord-player/opus)[@​0](https://togithub.com/0)[email protected]


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/discord-player-6.x-lockfile branch from 4b51bcd to 8cd875a Compare July 31, 2024 04:46
@renovate renovate bot changed the title fix(deps): update dependency discord-player to v6.7.0 fix(deps): update dependency discord-player to v6.7.1 Jul 31, 2024
@renovate renovate bot force-pushed the renovate/discord-player-6.x-lockfile branch from 8cd875a to b71c50a Compare August 24, 2024 06:04
Copy link

Stale pull request message

Copy link
Author

renovate bot commented Oct 3, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (^6.6.2). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/discord-player-6.x-lockfile branch October 3, 2024 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants