Skip to content

Instantly share code, notes, and snippets.

View xenos1337's full-sized avatar

xenos xenos1337

  • Germany
View GitHub Profile
@xenos1337
xenos1337 / enableDiscordExperiments.js
Last active March 24, 2024 16:25 — forked from MPThLee/enableDiscordExperiments.js
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;