Skip to content

Instantly share code, notes, and snippets.

@hyperlexus
Created February 3, 2024 10:46
Show Gist options
  • Save hyperlexus/d6a792ae9db1facb41bc77ef3b687e24 to your computer and use it in GitHub Desktop.
Save hyperlexus/d6a792ae9db1facb41bc77ef3b687e24 to your computer and use it in GitHub Desktop.
Discord enable Experiments (js); works as of 03 Feb 2024.
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUsers).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@hyperlexus
Copy link
Author

hyperlexus commented Feb 3, 2024

Follow this guide to enable devtools in discord stable, use a BD plugin to do so, or use PTB/Canary.
VERIFY THE CODE YOURSELF. SCAMMERS ARE EVERYWHERE
paste it into the console and hit enter AFTER VERIFYING
Created this gist because the most recent one was outdated and you had to scroll down very far to find the patched version.

Credit to Zyrenth in this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment