Discord-Oxygen / Discord-Console-hacks

A collection of JavaScript Codes I've made to enhance the User Experience of Discord and some other Discord related stuff
GNU General Public License v3.0
521 stars 114 forks source link

Staff Mode Doesn't still work... #66

Closed NB5K-UltraDeveloper closed 1 year ago

NB5K-UltraDeveloper commented 1 year ago

image

spinfal commented 1 year ago

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.

nashwik commented 1 year ago

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;
RobinRMC commented 1 year ago

@hxr404 This issue can be closed, as this has been fixed.