You need to wait some time after applying-disabling snippet to make button appear-disappear
Currently button to run activities is only available on Discord Games Lab.
After exploring this button with React Dev Tools we can see some IDs of activitiy applications
After some exploring webpack modules we can get some module with getEnabledAppIds
function. It get's guild ID
as argument and returns available activity IDs.
We can patch this function, so in any case it will return array with all application IDs.
Before pathing:
After patching:
Full version:
webpackChunkdiscord_app.push([
[Math.random().toString(36)],
{},
(e) => {
for (const id in e.c) {
const m = e.c[id].exports;
if (m?.default?.getEnabledAppIds) {
const saved = m.default.getEnabledAppIds;
window.disableActivities = () => {
m.default.getEnabledAppIds = saved;
window.disableActivities = undefined;
};
m.default.getEnabledAppIds = () => [
"755827207812677713",
"832012774040141894",
"832013003968348200",
"878067389634314250",
"879863976006127627",
"879863686565621790",
"852509694341283871",
"880218394199220334",
"773336526917861400",
"814288819477020702",
"879864070101172255",
"879863881349087252",
"832012854282158180",
"763133495793942528",
"880218832743055411",
"878067427668275241",
"879864010126786570",
"879864104980979792",
"891001866073296967",
"832012586023256104",
"832012682520428625",
"832013108234289153",
];
return;
}
}
},
]);
Minified version:
webpackChunkdiscord_app.push([[Math.random().toString(36)],{},(e) => {for (const id in e.c) {const m = e.c[id].exports;if (m?.default?.getEnabledAppIds) {const saved = m.default.getEnabledAppIds;window.disableActivities = () => {m.default.getEnabledAppIds = saved;window.disableActivities = undefined;};m.default.getEnabledAppIds = () => ["755827207812677713","832012774040141894","832013003968348200","878067389634314250","879863976006127627","879863686565621790","852509694341283871","880218394199220334","773336526917861400","814288819477020702","879864070101172255","879863881349087252","832012854282158180","763133495793942528","880218832743055411","878067427668275241","879864010126786570","879864104980979792","891001866073296967","832012586023256104","832012682520428625","832013108234289153"];return;}}}]);
Before patching my snippet saves original function. So it can be undone with
window.disableActivities();