You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
demoncord-rewrite/src/index.js

66 lines
1.7 KiB

import webpack from "./api/webpack.js";
import common from "./api/common.js";
import utils from "./api/utils/index.js";
import plugins from "./api/plugin.js";
import settings from "./api/ui/settings/settings.js";
import css from "./api/css.js";
import patcher from "./api/patcher";
if (!window.DiscordNative) {
//throw new Error("Sorry, Demoncord cannot be used on web!")
}
const demon = {
modules: {
webpack,
common
},
utils,
plugins,
internal: {
nest: common.nests.make()
},
css,
patcher,
stolas: {
monologue: () => {
const username = webpack.findByProps("getCurrentUser").getCurrentUser().username
return _.sample([
`${username}, you know that when I'm lonely, I become hungry. And when I become hungry, I want to choke on that red **** of yours... **** your ***** and lick all of your *****, before taking out your *****, and **** with more teeth until you're screaming ********** like a FUCKING baby--!`,
`Ohhh, ${username}! I'm so excited! I cannot wait to feel your slimy c**k inside of my ****. To ***** the— ...**** use while you and I and **** and jelly sandwiches all night...!`
]);
}
}
}
function isAllowed(mod) {
//TODO: actually implement permissions
return true;
}
function summon(mod) {
if (!isAllowed(mod)) {
throw new Error("Not allowed!"); //TODO: make this not irrepairably error out
}
const mods = mod.split("/");
let res = demon;
mods.forEach((m) => {
if (m in res) {
res = res[m];
} else {
throw new Error("Module does not exist!");
}
});
return res;
}
window.demon = {
summon
};
plugins.init();
settings.init();
/*//#if _ANALYTICS
import analytics from "./api/analytics"
analytics.init()
//#endif*/