shipgirlproject / Shoukaku

A stable, powerful and updated wrapper around Lavalink
https://guide.shoukaku.shipgirl.moe/
MIT License
273 stars 84 forks source link

Only one filter at once in v4 #150

Closed gaam24 closed 1 year ago

gaam24 commented 1 year ago

On v4 when I change filter by setRotation, setEqualizer etc. when other filter was set before this, it was reset and only new one was apply.

This same is when anyone filter was applied and volume was changed. Clear all filters and set volume.

Deivu commented 1 year ago

Will check once able to

gaam24 commented 1 year ago

I think problem is in there playerOptions: { filters: { tremolo }}

public async setTremolo(tremolo?: FreqSettings): Promise<void> {
     await this.node.rest.updatePlayer({
          guildId: this.connection.guildId,
          playerOptions: { filters: { tremolo }}
     });
     this.filters.tremolo = tremolo || null;
}

because when I use updatePlayer() with filters from player class after use setTremolo() all filters are working

await player.node.rest.updatePlayer({
     guildId: player.connection.guildId,
     playerOptions: { filters: player.filters}
});
Deivu commented 1 year ago

Fixed in latest master commits in commits 76dca52 onwards