A feature-rich, Discord music bot that supports multiple streaming platforms,with Button control, has Audio filters, and is easy to self-host with Docker
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.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps discord-player from 6.6.6 to 6.6.8.
Release notes
Sourced from discord-player's releases.
... (truncated)
Commits
2a0b3d2
chore(discord-player): release 6.6.80441e01
fix: update context api038c2fe
Now player can search on m.youtube.com (#1891) (#1894)a3d3d5b
Merge pull request #1893 from Androz2091/async-hookse14c7e5
chore(@discord-player/extractor
): release 4.4.7bd21ce2
feat: add async context api for hooks6c90c33
Fix play-dl cookie setting error (#1892)b677fbf
feat: add muusik.app (#1887)0291786
Update showcase - Jappan version (#1884)f324e01
chore: releaseDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show