Skip to content

Commit

Permalink
Update to lavalink v4, patch /play. Ready to release
Browse files Browse the repository at this point in the history
  • Loading branch information
RainyXeon committed Dec 24, 2023
1 parent 087c592 commit c080dd7
Show file tree
Hide file tree
Showing 117 changed files with 915 additions and 785 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"dependencies": {
"@hammerhq/localization": "^0.1.5",
"axios": "^1.6.0",
"better-kazagumo": "^0.0.4",
"bufferutil": "^4.0.8",
"chalk": "^5.3.0",
"chillout": "^5.0.0",
Expand All @@ -58,6 +57,7 @@
"fs-extra": "^11.1.1",
"humanize-duration": "^3.30.0",
"js-yaml": "^4.1.0",
"kazagumo.mod": "^1.0.0",
"lodash": "^4.17.21",
"markdown-it": "^13.0.2",
"moment": "^2.29.4",
Expand All @@ -71,7 +71,7 @@
"plsargs": "^0.1.6",
"pretty-ms": "^8.0.0",
"recursive-readdir": "^2.2.3",
"shoukaku": "^3.4.0",
"shoukaku": "^4.0.1",
"stuffs": "^0.1.34",
"utf-8-validate": "^5.0.2",
"voucher-code-generator": "^1.3.0",
Expand Down
137 changes: 35 additions & 102 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/commands/context/Play.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default class implements ContextCommand {
.setDescription(
`${client.i18n.get(language, "music", "play_track", {
title: tracks[0].title,
url: tracks[0].uri,
url: String(tracks[0].uri),
duration: new ConvertTime().parse(tracks[0].length as number),
request: String(tracks[0].requester),
})}`
Expand All @@ -112,7 +112,7 @@ export default class implements ContextCommand {
const embed = new EmbedBuilder().setColor(client.color).setDescription(
`${client.i18n.get(language, "music", "play_result", {
title: tracks[0].title,
url: tracks[0].uri,
url: String(tracks[0].uri),
duration: new ConvertTime().parse(tracks[0].length as number),
request: String(tracks[0].requester),
})}`
Expand Down
9 changes: 6 additions & 3 deletions src/commands/prefix/Filter/3d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ export default class implements PrefixCommand {
});

const data = {
op: "filters",
guildId: message.guild!.id,
rotation: { rotationHz: 0.2 },
playerOptions: {
filters: {
rotation: { rotationHz: 0.2 },
},
},
};

await player["send"](data);
await player.send(data);

const embed = new EmbedBuilder()
.setDescription(
Expand Down
37 changes: 20 additions & 17 deletions src/commands/prefix/Filter/Bass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,27 @@ export default class implements PrefixCommand {
});

const data = {
op: "filters",
guildId: message.guild!.id,
equalizer: [
{ band: 0, gain: 0.1 },
{ band: 1, gain: 0.1 },
{ band: 2, gain: 0.05 },
{ band: 3, gain: 0.05 },
{ band: 4, gain: -0.05 },
{ band: 5, gain: -0.05 },
{ band: 6, gain: 0 },
{ band: 7, gain: -0.05 },
{ band: 8, gain: -0.05 },
{ band: 9, gain: 0 },
{ band: 10, gain: 0.05 },
{ band: 11, gain: 0.05 },
{ band: 12, gain: 0.1 },
{ band: 13, gain: 0.1 },
],
playerOptions: {
filters: {
equalizer: [
{ band: 0, gain: 0.1 },
{ band: 1, gain: 0.1 },
{ band: 2, gain: 0.05 },
{ band: 3, gain: 0.05 },
{ band: 4, gain: -0.05 },
{ band: 5, gain: -0.05 },
{ band: 6, gain: 0 },
{ band: 7, gain: -0.05 },
{ band: 8, gain: -0.05 },
{ band: 9, gain: 0 },
{ band: 10, gain: 0.05 },
{ band: 11, gain: 0.05 },
{ band: 12, gain: 0.1 },
{ band: 13, gain: 0.1 },
],
},
},
};

await player["send"](data);
Expand Down
Loading

0 comments on commit c080dd7

Please sign in to comment.