Skip to content

Instantly share code, notes, and snippets.

@Reselim
Forked from MeguminSama/Discord Experiments.js
Created October 6, 2022 02:20
Show Gist options
  • Save Reselim/a65ff1f2ccef252332549e3f09a0a857 to your computer and use it in GitHub Desktop.
Save Reselim/a65ff1f2ccef252332549e3f09a0a857 to your computer and use it in GitHub Desktop.
Discord Experiments.js
webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=Object.values(r.c)]);
var UserStore = cache.find(m => m?.exports?.default?.getCurrentUser).exports.default;
var actions = UserStore._dispatcher._actionHandlers._orderedActionHandlers["CONNECTION_OPEN"];
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment