stuff
This commit is contained in:
parent
8afd2a241d
commit
36ba92f4c1
|
@ -149,7 +149,6 @@
|
|||
"UnreadStateTypes": {"props": ["ReadStateTypes"], "value": "ReadStateTypes"},
|
||||
"UploadUtils": {"props": ["upload", "instantBatchUpload"]},
|
||||
"URLParser": {"props": ["parse", "resolveObject"]},
|
||||
"UserBadgeKeys": {"props": ["BadgeKeys"], "value": "BadgeKeys"},
|
||||
"UserBioParser": {"props": ["parseBioReact"]},
|
||||
"UserFetchUtils": {"props": ["fetchCurrentUser", "getUser"]},
|
||||
"UserProfileModalUtils": {"props": ["openUserProfileModal", "closeUserProfileModal"]},
|
||||
|
|
|
@ -83,10 +83,10 @@ module.exports = (_ => {
|
|||
}
|
||||
};
|
||||
|
||||
for (let key of Object.keys(BDFDB.LibraryComponents.UserBadgeKeys).filter(n => isNaN(parseInt(n)))) {
|
||||
for (let key of Object.keys(BDFDB.DiscordConstants.UserFlags).filter(n => isNaN(parseInt(n)))) {
|
||||
let basicKey = key.replace(/_LEVEL_\d+/g, "");
|
||||
if (!badges[basicKey]) badges[basicKey] = {value: true, keys: []};
|
||||
badges[basicKey].keys.push(BDFDB.LibraryComponents.UserBadgeKeys[key]);
|
||||
badges[basicKey].keys.push(BDFDB.DiscordConstants.UserFlags[key]);
|
||||
}
|
||||
|
||||
this.css = `
|
||||
|
@ -437,7 +437,7 @@ module.exports = (_ => {
|
|||
}
|
||||
else for (let key of badges[flag].keys) {
|
||||
let userFlag = flag == "PREMIUM" || flag == "GUILD_BOOSTER" ? 0 : BDFDB.DiscordConstants.UserFlags[flag];
|
||||
let keyName = BDFDB.LibraryComponents.UserBadgeKeys[key];
|
||||
let keyName = BDFDB.DiscordConstants.UserFlags[key];
|
||||
if (userFlag == null && keyName) userFlag = BDFDB.DiscordConstants.UserFlags[keyName] != null ? BDFDB.DiscordConstants.UserFlags[keyName] : BDFDB.DiscordConstants.UserFlags[Object.keys(BDFDB.DiscordConstants.UserFlags).find(f => f.indexOf(keyName) > -1 || keyName.indexOf(f) > -1)];
|
||||
if (userFlag != null) {
|
||||
let id;
|
||||
|
|
Loading…
Reference in New Issue