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 v7 #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jan 2, 2025

This PR contains the following updates:

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

Release Notes

Androz2091/discord-player (discord-player)

v7.0.0: 7.0.0

Compare Source

See https://discord-player.js.org/docs/migrating/migrating_to_v7 for migration guide.

v6.7.1

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/Androz2091/discord-player/compare/discord-player@6.6.10...discord-player@6.7.1

v6.7.0

Compare Source

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/discord-player@6.6.10...discord-player@6.7.0

v6.6.10

Compare Source

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/discord-player@6.6.9...discord-player@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/discord-player@6.6.8...discord-player@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://redirect.github.com/discord-player/extractor)[@​4](https://redirect.github.com/4).4.7...discord-player@6.6.8

v6.6.7

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/Androz2091/discord-player/compare/discord-player@6.6.6...discord-player@6.6.7

v6.6.6

Compare Source

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[@​discord-player/extractor](https://redirect.github.com/discord-player/extractor)[@​4](https://redirect.github.com/4).4.5...discord-player@6.6.6

v6.6.5

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/Androz2091/discord-player/compare/[@​discord-player/equalizer](https://redirect.github.com/discord-player/equalizer)[@​0](https://redirect.github.com/0).2.3...discord-player@6.6.5

v6.6.4

Compare Source

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[@​discord-player/extractor](https://redirect.github.com/discord-player/extractor)[@​4](https://redirect.github.com/4).4.3...discord-player@6.6.4

v6.6.3

Compare Source

What's Changed

Full Changelog: https://github.com/Androz2091/discord-player/compare/[@​discord-player/opus](https://redirect.github.com/discord-player/opus)[@​0](https://redirect.github.com/0).1.2...discord-player@6.6.3


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.

Copy link
Author

renovate bot commented Jan 2, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: music-bot@1.0.0
npm ERR! Found: @discord-player/extractor@4.5.1
npm ERR! node_modules/@discord-player/extractor
npm ERR!   @discord-player/extractor@"^4.4.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @discord-player/extractor@"^7.0.0" from discord-player@7.0.0
npm ERR! node_modules/discord-player
npm ERR!   discord-player@"^7.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /tmp/renovate/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/renovate/cache/others/npm/_logs/2025-01-02T11_05_37_896Z-debug-0.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants