Plugin
AltKrispSwitch
Makes the Noise Suppression Popout switch between None and Krisp instead of Krisp and Standard
1
/*2
* FiveCord — a Discord client mod3
* Copyright (c) 2025 FiveCord4
* SPDX-License-Identifier: GPL-3.0-or-later5
*/6
7
import { Devs } from "@utils/constants";8
import definePlugin from "@utils/types";9
10
export default definePlugin({11
name: "AltKrispSwitch",12
description: "Makes the Noise Suppression Popout switch between None and Krisp instead of Krisp and Standard",13
authors: [Devs.FiveCord],14
patches: [15
{16
find: ",setNoiseCancellation(",17
replacement: {18
match: /(}\),)(.{1,2}\.default\.dispatch\({type:"AUDIO_SET_NOISE_SUPPRESSION",)/,19
replace: "$1!$self.shouldCancelSuppression(arguments)&&$2"20
}21
}22
],23
shouldCancelSuppression([enableKrisp, { section: origin }]) {24
if (origin === "Noise Cancellation Popout") {25
if (enableKrisp) {26
return false;27
} else {28
// don't enable standard noise suppression if disabling29
return true;30
}31
}32
}33
});34