Skip to content

Instantly share code, notes, and snippets.

@MPThLee
Last active May 30, 2026 18:58
Show Gist options
  • Select an option

  • Save MPThLee/3ccb554b9d882abc6313330e38e5dfaa to your computer and use it in GitHub Desktop.

Select an option

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 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.
@acendvgnt
Copy link
Copy Markdown

Newly created account and already posting token grabbers is crazy work

@hironichu
Copy link
Copy Markdown

Thank Claude for this:

{
  var wpR = [];
  webpackChunkdiscord_app.push([[Symbol()], {}, function(r) { wpR.push(r); }]);
  webpackChunkdiscord_app.pop();

  var r = wpR[0]; // Discord runtime (not Sentry)
  var UserStore = r(287809).default;
  var user = UserStore.getCurrentUser();
  var nodes = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);

  user.flags |= 1;
  nodes.find(x => x.name === "DeveloperExperimentStore")?.actionHandler?.CONNECTION_OPEN?.();

  var expStore = nodes.find(x => x.name === "ExperimentStore");
  try {
    expStore.actionHandler.CONNECTION_OPEN({ type: "CONNECTION_OPEN", user: { flags: 1 }, experiments: [] });
  } catch {
    try { expStore.actionHandler.OVERLAY_INITIALIZE({ user: { flags: 1 } }); } catch(e) {}
  }

  expStore?.storeDidChange?.();
  user.flags &= ~1;
  console.log("Done — open Settings → Experiments");
}

This should work, follow me and have fun ;)

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