Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Discord Experiments.js
var cache = Object.values(webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => r.c]));
webpackChunkdiscord_app.pop();
var DevStore = cache.find(m => m?.exports?.default?.isDeveloper !== void 0).exports.default;
var UserStore = cache.find(m => m?.exports?.default?.getUsers).exports.default;
var nodes = Object.values(DevStore._dispatcher._actionHandlers._dependencyGraph.nodes);
try {
nodes.find(n => n.name == "ExperimentStore").actionHandler["OVERLAY_INITIALIZE"]({
user: { flags: 1 }, type: "CONNECTION_OPEN"
});
} catch { }
var oldGetUser = UserStore.getCurrentUser;
UserStore.getCurrentUser = () => ({ hasFlag: () => true });
nodes.find(n => n.name == "DeveloperExperimentStore").actionHandler["OVERLAY_INITIALIZE"]();
UserStore.getCurrentUser = oldGetUser;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment