feat(ConsoleJanitor): NoNitroUpsell Logger Predicate

This commit is contained in:
thororen1234 2024-07-25 01:20:57 -04:00
parent 5b4fb13ab3
commit e59763c9d2

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings, Settings } from "@api/Settings";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
@ -105,6 +105,7 @@ export default definePlugin({
}, },
{ {
find: "ProductCatalog", find: "ProductCatalog",
predicate: () => Settings.plugins.NoNitroUpsell.enabled,
replacement: { replacement: {
match: /\i\.warn\("Cannot find the corresponding SKU to the user's premium type "\.concat\(\i\.premiumType\)\),/, match: /\i\.warn\("Cannot find the corresponding SKU to the user's premium type "\.concat\(\i\.premiumType\)\),/,
replace: "" replace: ""