Discord-Console-hacks icon indicating copy to clipboard operation
Discord-Console-hacks copied to clipboard

Staff Mode Doesn't still work...

Open NB5K-UltraDeveloper opened this issue 1 year ago • 2 comments

image

NB5K-UltraDeveloper avatar Oct 01 '22 11:10 NB5K-UltraDeveloper

Discord recently switched from Babel to SWC and this broke essentially every client mod & nearly every webpack/console snippet. Almost everything will need to be rewritten.

spinfal avatar Oct 02 '22 00:10 spinfal

Hey, if you want to active experiments you can use this code:

let wpRequire;
window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]),mod=Object.values(wpRequire.c).find((e=>void 0!==e?.exports?.Z?.isDeveloper)),usermod=Object.values(wpRequire.c).find((e=>e?.exports?.default?.getUsers)),nodes=Object.values(mod.exports.Z._dispatcher._actionHandlers._dependencyGraph.nodes);try{nodes.find((e=>"ExperimentStore"==e.name)).actionHandler.OVERLAY_INITIALIZE({user:{flags:1}})}catch(e){}oldGetUser=usermod.exports.default.__proto__.getCurrentUser,usermod.exports.default.__proto__.getCurrentUser=()=>({hasFlag:()=>!0}),nodes.find((e=>"DeveloperExperimentStore"==e.name)).actionHandler.CONNECTION_OPEN(),usermod.exports.default.__proto__.getCurrentUser=oldGetUser;

nashwik avatar Oct 04 '22 11:10 nashwik