This commit is contained in:
Mirco Wittrien 2021-08-09 16:56:23 +02:00
parent 817852fed4
commit d5d2fcfac4
2 changed files with 6 additions and 3 deletions

View File

@ -2356,7 +2356,10 @@ module.exports = (_ => {
for (let name in InternalData.LibraryModules) {
if (InternalData.LibraryModules[name].props) {
if (InternalData.LibraryModules[name].nonProps) LibraryModules[name] = BDFDB.ModuleUtils.find(m => InternalData.LibraryModules[name].props.every(prop => typeof m[prop] == "function") && InternalData.LibraryModules[name].nonProps.every(prop => typeof m[prop] != "function"));
if (InternalData.LibraryModules[name].nonProps) LibraryModules[name] = BDFDB.ModuleUtils.find(m => InternalData.LibraryModules[name].props.every(prop => {
const value = m[prop];
return value !== undefined && !(typeof value == "string" && !value);
}) && InternalData.LibraryModules[name].nonProps.every(prop => m[prop] === undefined));
else LibraryModules[name] = BDFDB.ModuleUtils.findByProperties(InternalData.LibraryModules[name].props);
}
else if (InternalData.LibraryModules[name].strings) LibraryModules[name] = BDFDB.ModuleUtils.findByString(InternalData.LibraryModules[name].strings);

View File

@ -117,7 +117,7 @@
"SettingsUtils": {"props": ["updateRemoteSettings", "updateLocalSettings"]},
"SimpleMarkdownComponents": {"strings": ["customEmoji", "emojiTooltipPosition", "timestampTooltip"]},
"SimpleMarkdownParser": {"props": ["parseBlock", "parseInline", "defaultOutput"]},
"SlateUtils": {"props": ["serialize", "deserialize"], "notProps": ["getFlag"]},
"SlateUtils": {"props": ["serialize", "deserialize"], "nonProps": ["getFlag"]},
"SlateSelectionUtils": {"props": ["serialize", "serializeSelection"]},
"SlowmodeUtils": {"props": ["getSlowmodeCooldownGuess"]},
"SoundParser": {"strings": ["discodo", "ddr-down", "mute"]},
@ -138,7 +138,7 @@
"TimestampUtils": {"props": ["fromTimestamp", "extractTimestamp"]},
"TimeUtils": {"props": ["calendarFormat", "dateFormat"]},
"ThreadStore": {"props": ["isActive", "getThreadsForGuild"]},
"UnreadGuildUtils": {"props": ["hasUnread", "getMentionCount"], "notProps": ["getOldestUnreadMessageId"]},
"UnreadGuildUtils": {"props": ["hasUnread", "getMentionCount"], "nonProps": ["getOldestUnreadMessageId"]},
"UnreadChannelUtils": {"props": ["getUnreadCount", "getOldestUnreadMessageId"]},
"UploadUtils": {"props": ["upload", "instantBatchUpload"]},
"URLParser": {"props": ["parse", "resolveObject"]},