Skip to content

Instantly share code, notes, and snippets.

@ExampleWasTaken
Last active February 22, 2024 18:03
Show Gist options
  • Save ExampleWasTaken/44ebdb4ac5980760ae8ebfbf995c5390 to your computer and use it in GitHub Desktop.
Save ExampleWasTaken/44ebdb4ac5980760ae8ebfbf995c5390 to your computer and use it in GitHub Desktop.
Enable Discord Developer Options and more

DISCLAIMER

I am in no way, shape, or form responsible for any damage caused by the usage of these snippets. You use them at your own risk! I am not related to Discord in any way.

This gist is unmaintained! Feel free to fork it.

What is this?

Using the Chrome dev tools you can do some fun stuff with the Discord client. As they are disabled on the stable version you need to use the canary version which is used to test new features before they get released to the stable version. It's usage is totally legal and within ToS. Discord does not promote it but encourages users to use it to find bugs, etc.

You can download the latest Canary builds here:

Tip

The console stores your last commands beyond sessions. You can toggle through them by hitting . This is especially useful when you want to activate the developer options after an update or restart. Just open the console with Cmd+Option+I on macOS and Ctrl+Shift+I on Windows, hit until it completes the correct statement in the console and hit enter.

Note that you need to type/paste and execute the command at least once for that to work.

Enable Developer Options

This is not to be confused with the Developer Mode of Discord that allows you to copy user IDs! This will give you 5 new tabs in the sidebar of your Discord user settings:

  • Experiments
    • Experiments are a way for Discord to test out new things before they release them for everyone. They are usually run with a smaller user base. This tab allows you to opt-in for all experiments that Discord is currently running publicly.
  • Developer Options
    • Various settings that help Discord devs develop the application.
  • Hotspot Options
  • Dismissable Contents
    • Re-enable tooltips, banners, coach marks
  • Payment Flow Modals
    • Well, pretty much what the name says
let wpRequire;
window.webpackChunkdiscord_app.push([[ Math.random() ], {}, (req) => { wpRequire = req; }]);
mod = Object.values(wpRequire.c).find(x => typeof x?.exports?.default?.isDeveloper !== "undefined")
usermod = Object.values(wpRequire.c).find(x => x?.exports?.default?.getUsers)
nodes = Object.values(mod.exports.default._dispatcher._dependencyGraph.nodes)
try {
    nodes.find(x => x.name == "ExperimentStore").actionHandler["CONNECTION_OPEN"]({user: {flags: 1}, type: "CONNECTION_OPEN"})
} 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

Credit: Check it out!

Nitro

STOP! This will NOT give you free nitro! It will only make your client think you have nitro.

Enable Nitro

(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m => m?.exports?.default?.getCurrentUser).exports.default.getCurrentUser().premiumType = 2

Enable Nitro Classic

(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m => m?.exports?.default?.getCurrentUser).exports.default.getCurrentUser().premiumType = 1

Guilds

Please note, that <guild_id> always needs to be replaced by the ID of the guild that you want to use the snippets for.

Guild information

Display general information about a guild.

(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m => m?.exports?.default?.getGuild).exports.default.getGuild("<guild_id>")

Guild Features

Display all features of a guild.

(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m => m?.exports?.default?.getGuild).exports.default.getGuild("<guild_id>").features

Lurk a guild

When lurking a guild you can see all public channels but not interact with the guild (chatting, joining VC, etc.). You might know this mode as "Preview mode".

(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m => m?.exports?.startLurking).exports.startLurking("<guild_id>", {}, undefined);
@anonfoxer2
Copy link

Just out of curiosity and because I am major stupid, does the Enable Developer Options console command permanently stick? or do the changes go away upon refreshing the client?

@ExampleWasTaken
Copy link
Author

ExampleWasTaken commented Jun 1, 2022

@anonfoxer2

Nope, unfortunately you have to enable them each time you reload your client. This includes reloading using Ctrl+R/CMD+R, updating and restarting.

However, some experiments stay enabled even beyond these actions.

@anonfoxer2
Copy link

Alright, that's actually beneficial to me. Was hoping to be able to test these things without permanent changes to my client or account, just to be able to see and poke around out of curiosity. Thanks for the response.

@ExampleWasTaken
Copy link
Author

ExampleWasTaken commented Jun 11, 2022

Alright, that's actually beneficial to me. Was hoping to be able to test these things without permanent changes to my client or account, just to be able to see and poke around out of curiosity. Thanks for the response.

You're welcome :)

@Ari24-cb24
Copy link

Just curious, how did you/the original creator come up with that stuff? Was it experience or maybe some hints in the documentation?

@TheAndromedaCat
Copy link

The developer settings one doesn't work at all as of August 1st. Tried all 3 Discord clients, with the "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true on in settings.json. Not sure what's wrong there

@Hamletf
Copy link

Hamletf commented Aug 1, 2022

The developer settings one doesn't work at all as of August 1st. Tried all 3 Discord clients, with the "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true on in settings.json. Not sure what's wrong there

Same issue here, the settings.json edit doesn't work, and the snipper gives error

VM744:1 Uncaught TypeError: Cannot redefine property: isDeveloper
at Function.defineProperty ()
at :1:8

@TymonKinneas
Copy link

The developer settings one doesn't work at all as of August 1st. Tried all 3 Discord clients, with the "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true on in settings.json. Not sure what's wrong there

Also same. Wonder if they actually got rid of it entirely...

@rekkisomo
Copy link

The developer settings one doesn't work at all as of August 1st. Tried all 3 Discord clients, with the "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true on in settings.json. Not sure what's wrong there

Also same. Wonder if they actually got rid of it entirely...

It hasn't been removed thankfully :) Currently working script was posted a little bit ago here. It just seems that discord did a little overhaul and it's causing some scripts to fail (even some not related to experiments, for me :<)

@BachLe2000
Copy link

Lurk Guild is not working.

@dyban
Copy link

dyban commented Mar 15, 2023

This doesnt work anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment