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
| let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]); | |
| var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default; | |
| var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes); | |
| var user = UserStore.getCurrentUser(); | |
| actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({ | |
| type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [], | |
| }); | |
| actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN(); | |
| webpackChunkdiscord_app.pop(); user.flags &= ~1; "done"; |
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
| """ | |
| USE THIS AT YOUR OWN RISK. THIS IS UNDOCUMENTED, I WILL NOT BE RESPONSIBLE FOR WHAT HAPPENS WITH YOUR BOT(S). | |
| You can import this into your main file since these are top-level statements or just copy-paste the whole thing (with credits). | |
| What this does is patch the identify payload, the `$browser` field to be exact. | |
| Since it's hardcoded in discord.py, we monkey-patch it. | |
| You can change it to either `Discord Android` or `Discord iOS`—I'm not aware of any other options, | |
| but those 2 seem to trigger the mobile indicator. |
OlderNewer