This commit is contained in:
Mirco Wittrien 2019-11-07 19:06:36 +01:00
parent 0ef883e75b
commit c34daced0b
2 changed files with 13 additions and 1 deletions

View File

@ -1316,6 +1316,13 @@ var BDFDB = {
BDFDB.DiscordConstants = BDFDB.ModuleUtils.findByProperties("Permissions", "ActivityTypes");
var DiscordObjects = {};
DiscordObjects.Channel = BDFDB.ModuleUtils.findByPrototypes("initialize", "getTitleIcon", "getGuildId");
DiscordObjects.Guild = BDFDB.ModuleUtils.findByPrototypes("initialize", "getMaxEmojiSlots", "getRole");
DiscordObjects.Message = BDFDB.ModuleUtils.findByPrototypes("initialize", "getAuthorName", "getChannelId");
DiscordObjects.User = BDFDB.ModuleUtils.findByPrototypes("initialize", "isLocalBot", "isClaimed");
BDFDB.DiscordObjects = Object.assign({}, DiscordObjects);
var LibraryRequires = {};
for (let name of ["child_process", "electron", "fs", "path", "process", "request"]) {
try {LibraryRequires[name] = require(name);} catch (err) {}
@ -8367,6 +8374,7 @@ var BDFDB = {
if (BDFDB.UserUtils.me.id == "278543574059057154") {
for (let module in DiscordClassModules) if (!DiscordClassModules[module]) BDFDB.LogUtils.warn(module + " not initialized in DiscordClassModules");
for (let obj in DiscordObjects) if (!DiscordObjects[module]) BDFDB.LogUtils.warn(module + " not initialized in DiscordObjects");
for (let require in LibraryRequires) if (!LibraryRequires[require]) BDFDB.LogUtils.warn(require + " not initialized in LibraryRequires");
for (let module in LibraryModules) if (!LibraryModules[module]) BDFDB.LogUtils.warn(module + " not initialized in LibraryModules");
for (let component in NativeSubComponents) if (!NativeSubComponents[component]) BDFDB.LogUtils.warn(component + " not initialized in NativeSubComponents");
@ -8493,6 +8501,10 @@ var BDFDB = {
};
BDFDB.ModuleUtils.DevFuncs.req = InternalBDFDB.getWebModuleReq();
}
for (let obj in DiscordConstants) if (!DiscordObjects[obj]) {
DiscordObjects[obj] = function () {};
BDFDB.DiscordObjects[obj] = function () {};
}
for (let component in NativeSubComponents) if (!NativeSubComponents[component]) NativeSubComponents[component] = "div";
for (let component in LibraryComponents) if (!LibraryComponents[component]) {
LibraryComponents[component] = "div";

File diff suppressed because one or more lines are too long