Update ColorPicker.jsx

Made it get the GuildFolderNode module, which seems to be the exact same one
pull/91/head
bakzkndd 2 years ago
parent 3f4dc36cb7
commit d407ab33f0

@ -5,8 +5,8 @@ import AsyncComponent from './AsyncComponent';
export default AsyncComponent.from((async () => {
/* Thanks to Harley for this~ */
const GuildFolderSettingsModal = await getModuleByDisplayName('GuildFolderSettingsModal', true);
const ModalRoot = GuildFolderSettingsModal?.prototype?.render?.call({ props: { transitionState: 0 }, state: { name: '', color: '' } });
const GuildFolderNode = await getModuleByDisplayName('GuildFolderNode', true);
const ModalRoot = GuildFolderNode?.prototype?.render?.call({ props: { transitionState: 0 }, state: { name: '', color: '' } });
const SuspendedPicker = findInReactTree(ModalRoot, n => n.props?.defaultColor)?.type;
const LazyWebpackModule = await SuspendedPicker()?.props?.children?.type;
const mdl = await (LazyWebpackModule?._ctor || LazyWebpackModule?._payload?._result)();

Loading…
Cancel
Save