Skip to content

Instantly share code, notes, and snippets.

@xenos1337
Forked from MPThLee/enableDiscordExperiments.js
Last active March 24, 2024 16:25
Show Gist options
  • Save xenos1337/78adbb2ea4b6bd178c64459ac34d8c54 to your computer and use it in GitHub Desktop.
Save xenos1337/78adbb2ea4b6bd178c64459ac34d8c54 to your computer and use it in GitHub Desktop.
Enable Discord Developer Menus in any environment except mobile app without BetterDiscord using Console.
webpackChunkdiscord_app.push([[Math.random()], {}, (e) => { if(e.c!=undefined){module = Object.values(e.c).find(x => x?.exports?.default?.getUsers).exports.default;} }]);
nodes = Object.values(module._dispatcher._actionHandlers._dependencyGraph.nodes);
try { nodes.find(x => x.name == "ExperimentStore").actionHandler["OVERLAY_INITIALIZE"]({ user: { flags: 1 } }); } catch (e) { }
original = [module.getCurrentUser, module.getNonImpersonatedCurrentUser];
module.getCurrentUser = module.getNonImpersonatedCurrentUser = () => ({ isStaff: () => true });
nodes.find(x => x.name == "DeveloperExperimentStore").actionHandler["OVERLAY_INITIALIZE"]();
[module.getCurrentUser, module.getNonImpersonatedCurrentUser] = original;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment