Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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 => === "ExperimentStore").actionHandler({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
actions.find(n => === "DeveloperExperimentStore").actionHandler();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
Copy link

MeguminSama commented Dec 15, 2020

Allows you to enable experiments in the latest discord builds. Working as of 2023-01-04
Works on Stable, PTB, Canary on Web & Desktop.

If it doesn't work for you, check the following

  • Is your client modded? This is a no-brainer but if it's modded, please don't complain here if the script doesn't work
    • Some BetterDiscord plugins are known to do stupid stuff with the webpack cache.
  • Do you have a web extension that messes with Discord? Check the previous bullet-point :)
  • Are you running an old build of discord (e.g. Displunger)? If so, check the revision history and try an older version.

If the answer to any of these is "yes", then don't complain here.

This script supports SWC. Stop blaming issues on SWC.

Copy link

Very useful! Thanks! ❤️

Copy link

MeguminSama commented Jun 30, 2021

I'll start deleting dumb comments from now on. Let me make a small FAQ.

Q: "I enabled an experiment but cant use it!!!!"
A: Discord locks many experiments on the API. Enabling it on the client does not bypass this.

Q: "omg ur gonna steal my details"
A: Read the code. It literally just changes a zero to a one (false -> true).

Q: "How to I disable this?"
A: Press CTRL+R to refresh the client, or fully close it from the taskbar and restart it.

Q: "It didn't work!!!"
A: Good for you. I'm not your support agent.

Copy link

MeguminSama commented Sep 6, 2021

[Reserved for future use]

Copy link


Copy link

ghost commented Oct 30, 2021

I don't know whether to be offended, or to laugh lol

Copy link

thanks pal, I loved that QA disclaimer

Copy link

13-05 commented Mar 12, 2022

ggz, pog code

Copy link


Copy link

works :)

Copy link

hiideki commented Dec 7, 2022

i love u

Copy link

poob1 commented Dec 13, 2022


Copy link

read if cute

Copy link

UserUNP commented Dec 17, 2022

quite incredible

Copy link

Q: "It didn't work!!!"
A: Good for you. I'm not your support agent.

Best faq writer 😂

Copy link

Update ur gist please. This code doesn't work

still works for me

Copy link

"I'm not your support agent."

You might be my spirit animal though.

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