From f01a3a97df2bc532b32e5fa2e631a63fed14e4b8 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 14 Mar 2024 16:55:37 +0800 Subject: [PATCH] fix: effects not working Loads effects plugin and implements fix for equalizer values (thanks @viztea) --- src/lib/PlayerHandler.ts | 2 +- src/main.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/PlayerHandler.ts b/src/lib/PlayerHandler.ts index 5ed0b692..abf34dcd 100644 --- a/src/lib/PlayerHandler.ts +++ b/src/lib/PlayerHandler.ts @@ -49,7 +49,7 @@ const effects: Record = { band: 4, gain: 0.0, }, - ...new Array(10).map( + ...Array.from({ length: 10 }).map( (_, i): { band: number; gain: number } => ({ band: i + 5, gain: -0.05, diff --git a/src/main.ts b/src/main.ts index 1776c3c9..a4af6f3e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,6 +18,7 @@ import { } from '#src/lib/util/common.js'; import { settings } from '#src/lib/util/settings.js'; import { getGuildLocaleString } from '#src/lib/util/util.js'; +import { load as effectsLoad } from '@lavaclient/plugin-effects'; import { load as queueLoad } from '@lavaclient/plugin-queue'; import { load } from '@lavaclient/spotify'; import { @@ -49,6 +50,7 @@ import { inspect } from 'util'; import { version } from './lib/util/version.js'; import type { QuaverEvent, QuaverMusicEvent } from './main.d.js'; +effectsLoad(); queueLoad(); export const startup = { started: false };