Skip to content

Commit

Permalink
fix NewGuildSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendicated committed Jun 19, 2024
1 parent 920f326 commit e9e789b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/plugins/newGuildSettings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@
import { definePluginSettings, migratePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { findByCodeLazy, findByPropsLazy } from "@webpack";
import { findByCodeLazy, findByPropsLazy, mapMangledModuleLazy } from "@webpack";

const { updateGuildNotificationSettings } = findByPropsLazy("updateGuildNotificationSettings");
const { toggleShowAllChannels } = findByPropsLazy("toggleShowAllChannels");
const { toggleShowAllChannels } = mapMangledModuleLazy(".onboardExistingMember(", {
toggleShowAllChannels: m => {
const s = String(m);
return s.length < 100 && !s.includes("onboardExistingMember") && !s.includes("getOptedInChannels");
}
});
const isOptInEnabledForGuild = findByCodeLazy(".COMMUNITY)||", ".isOptInEnabled(");

const settings = definePluginSettings({
Expand Down

0 comments on commit e9e789b

Please sign in to comment.