Skip to content

Instantly share code, notes, and snippets.

Embed
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 => 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";
@MeguminSama
Copy link
Author

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.

@migue802
Copy link

Very useful! Thanks! ❤️

@MeguminSama
Copy link
Author

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.

@MeguminSama
Copy link
Author

MeguminSama commented Sep 6, 2021

[Reserved for future use]

@Dragonizedpizza
Copy link

Screenshot_20211004-172514
LOL

Copy link

ghost commented Oct 30, 2021

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

@erickonlive
Copy link

thanks pal, I loved that QA disclaimer

@13-05
Copy link

13-05 commented Mar 12, 2022

ggz, pog code

@jkosixtyfour
Copy link

thanks

@DeltaNachos
Copy link

works :)

@hiideki
Copy link

hiideki commented Dec 7, 2022

i love u

@poob1
Copy link

poob1 commented Dec 13, 2022

meguu

@Vendicated
Copy link

read if cute

@UserUNP
Copy link

UserUNP commented Dec 17, 2022

quite incredible

@EvaxTheFox
Copy link

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

Best faq writer 😂

@BuyMyMojo
Copy link

Update ur gist please. This code doesn't work

still works for me

@ImaginAqua
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