Last active
May 29, 2025 09:38
-
Star
(250)
You must be signed in to star a gist -
Fork
(23)
You must be signed in to fork a gist
-
-
Save MPThLee/3ccb554b9d882abc6313330e38e5dfaa to your computer and use it in GitHub Desktop.
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* !!!! This code doesn't work anymore !!!! | |
* | |
* - You can check working code on comments. I won't update this code anymore. | |
* | |
* Also, I just decided to remove this code. You can check revisions for old code. | |
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore. | |
* I don't want people keep arguing in the comments, i decided to remove this code. | |
* | |
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything. | |
* Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments | |
**/ | |
// Older gist description: Enable Discord Developer Menus in any environment except mobile app without BetterDiscord using Console. |
Oh, huh, it works fine now! Apologies!
- changed
e.c!=undefined
toe.b!=undefined
webpackChunkdiscord_app.push([[Math.random()], {}, (e) => { if(e.b!=undefined){module = Object.values(e.c).find(x => x?.exports?.default?.getUsers && x.exports.default._dispatcher._actionHandlers).exports.default;} }]); nodes = Object.values(module._dispatcher._actionHandlers._dependencyGraph.nodes); try { nodes.find(x => x.name == "ExperimentStore").actionHandler["OVERLAY_INITIALIZE"]({ user: { flags: 1 } }); } catch (e) { } original = [module.getCurrentUser, module.getNonImpersonatedCurrentUser]; module.getCurrentUser = module.getNonImpersonatedCurrentUser = () => ({ isStaff: () => true }); nodes.find(x => x.name == "DeveloperExperimentStore").actionHandler["OVERLAY_INITIALIZE"](); [module.getCurrentUser, module.getNonImpersonatedCurrentUser] = original;
This worked! Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Orchidthederg
The output is normal. I'm not sure why it wouldn't work on a BD client. Try opening the User Settings AFTER executing the code block and see if anything changes?