Update BDFDB.js

This commit is contained in:
Mirco Wittrien 2020-01-31 09:08:52 +01:00
parent f602ebb443
commit 69421d9681
1 changed files with 5 additions and 2 deletions

View File

@ -1027,10 +1027,12 @@
"QuickSwitchGuildResult"
];
WebModulesData.DefaultRender = [
"Message",
"Message"
];
WebModulesData.MemoComponent = [
"MessageContent"
];
WebModulesData.NonPrototype = [].concat(WebModulesData.DefaultRender, [
WebModulesData.NonPrototype = [].concat(WebModulesData.DefaultRender, WebModulesData.MemoComponent, [
"ChannelTextAreaContainer"
]);
WebModulesData.LoadedInComponents = {
@ -1290,6 +1292,7 @@
delete plugin.patchedModules[patchtype][type];
}
if (WebModulesData.DefaultRender.includes(type.split(" _ _ ")[1] || type)) patchInstance((BDFDB.ModuleUtils.findByName(mappedtype.split(" _ _ ")[0], false) || {}).exports, mappedtype, patchtype, true);
else if (WebModulesData.MemoComponent.includes(type.split(" _ _ ")[1] || type)) patchInstance((BDFDB.ModuleUtils.findByName(mappedtype.split(" _ _ ")[0], false) || {exports:{}}).exports.default, mappedtype, patchtype, true);
else if (!classname) patchInstance(BDFDB.ModuleUtils.findByName(mappedtype.split(" _ _ ")[0]), mappedtype, patchtype);
else if (DiscordClasses[classname]) checkForInstance(classname, mappedtype, patchtype, WebModulesData.ForceObserve.includes(type.split(" _ _ ")[1] || type));
}