Skip to content

Instantly share code, notes, and snippets.

@Aholicknight
Created December 7, 2023 22:47
Show Gist options
  • Save Aholicknight/effd6f573047c3e7b982ccbb997d4021 to your computer and use it in GitHub Desktop.
Save Aholicknight/effd6f573047c3e7b982ccbb997d4021 to your computer and use it in GitHub Desktop.
Activates Discord Experiments. Last updated 12/7/2023
/**
* @name discordExperimentsfixed
* @description Enables the experiments tab in discord's settings.
* @author Bidasci
* @version 1.3.3.7
*/
const settingsStore = BdApi.findModule(m => typeof m?.default?.isDeveloper !== "undefined");
const userStore = BdApi.findModule(m => m?.default?.getUsers);
module.exports = class {
getName() {
return "Discord Experiments Fixed";
}
start() {
let _, a = Object.values,
b = "getCurrentUser",
c = "actionHandler",
d = "_actionHandlers",
l = "_dispatcher",
i = "ExperimentStore";
webpackChunkdiscord_app.push([
[Date.now()], {},
e => {
_ = e
}
]);
let u = a(_.c).find(e => e?.exports?.default?.[b] && e?.exports?.default?.[l]?.[d]).exports.default;
let m = a(u[l][d]._dependencyGraph.nodes);
u[b]().flags |= 1;
m.find(e => "Developer" + i == e.name)[c].CONNECTION_OPEN();
try {
m.find(e => i == e.name)[c].OVERLAY_INITIALIZE({
user: {
flags: 1
}
})
} catch {}
m.find(e => i == e.name).storeDidChange();
}
stop() {
let _, a = Object.values,
b = "getCurrentUser",
c = "actionHandler",
d = "_actionHandlers",
l = "_dispatcher",
i = "ExperimentStore";
let u = a(_.c).find(e => e?.exports?.default?.[b] && e?.exports?.default?.[l]?.[d]).exports.default;
let m = a(u[l][d]._dependencyGraph.nodes);
m.find(e => i == e.name)[c].OVERLAY_INITIALIZE({
user: {
flags: 0
},
type: "CONNECTION_OPEN"
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment