Skip to content

Instantly share code, notes, and snippets.

@User9684
Created March 20, 2023 16:19
Show Gist options
  • Save User9684/a0c9026f5009d150d2cd0e526caecfd8 to your computer and use it in GitHub Desktop.
Save User9684/a0c9026f5009d150d2cd0e526caecfd8 to your computer and use it in GitHub Desktop.
Locally enables nitro
// Access the webpack modules
window.webpackChunkdiscord_app.push([[Math.random()], {}, (wpRequire) => {
// Constants used to access webpack functions
const webpackValues = Object.values(wpRequire.c);
const usermod = webpackValues.find((x) => x?.exports?.default?.getUsers);
// Original getCurrentUser function
const oldUser = usermod.exports.default.__proto__.getCurrentUser;
// Set currentUser to follow configured settings
usermod.exports.default.__proto__.getCurrentUser = () => {
const userData = oldUser();
const newUserData = {
...userData,
premiumType: 2,
__proto__: userData.__proto__
};
return newUserData;
};
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment