Skip to content

Instantly share code, notes, and snippets.

@arnvgh
Created November 19, 2022 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnvgh/8f4a37ff3451f93dd41d6e7bc3672328 to your computer and use it in GitHub Desktop.
Save arnvgh/8f4a37ff3451f93dd41d6e7bc3672328 to your computer and use it in GitHub Desktop.
a trick to get it to 25MB (discord 8mb limit :P), hint:
let wpRequire;
window.webpackChunkdiscord_app.push([[ Math.random() ], {}, (req) => { wpRequire = req; }]);
mod = Object.values(wpRequire.c).find(x => typeof x?.exports?.Z?.isDeveloper !== "undefined");
usermod = Object.values(wpRequire.c).find(x => x?.exports?.default?.getUsers)
nodes = Object.values(mod.exports.Z._dispatcher._actionHandlers._dependencyGraph.nodes)
try {
nodes.find(x => x.name == "ExperimentStore").actionHandler["OVERLAY_INITIALIZE"]({user: {flags: 1}})
} catch (e) {}
oldGetUser = usermod.exports.default.__proto__.getCurrentUser;
usermod.exports.default.__proto__.getCurrentUser = () => ({hasFlag: () => true})
nodes.find(x => x.name == "DeveloperExperimentStore").actionHandler["CONNECTION_OPEN"]()
usermod.exports.default.__proto__.getCurrentUser = oldGetUser
// then go to experimental features and enable 25MB for free
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment