This commit is contained in:
Mirco Wittrien 2022-03-10 17:38:07 +01:00
parent 44ff41247d
commit c9cb745879
2 changed files with 9 additions and 12 deletions

View File

@ -2,7 +2,7 @@
* @name ShowBadgesInChat
* @author DevilBro
* @authorId 278543574059057154
* @version 1.8.7
* @version 1.8.8
* @description Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/DMList
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "ShowBadgesInChat",
"author": "DevilBro",
"version": "1.8.7",
"version": "1.8.8",
"description": "Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/DMList"
}
};
@ -396,13 +396,14 @@ module.exports = (_ => {
wrappers.push(this.createBadges(user, null, "settings"));
}
else for (let key of this.defaults.badges[flag].keys) {
let userFlag = flag == "PREMIUM" || flag == "PREMIUM_GUILD_SUBSCRIPTION" ? 0 : BDFDB.DiscordConstants.UserFlags[flag];
let userFlag = flag == "PREMIUM" || flag == "GUILD_BOOSTER" ? 0 : BDFDB.DiscordConstants.UserFlags[flag];
let keyName = BDFDB.LibraryModules.UserBadgeKeys[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)];
console.log(key, userFlag, keyName);
if (userFlag != null) {
let id;
if (flag == "PREMIUM") id = specialFlag + "NITRO";
else if (keyName && keyName.startsWith("PREMIUM_GUILD_SUBSCRIPTION")) id = specialFlag + "GB_" + keyName.split("_").pop();
else if (keyName && keyName.startsWith("GUILD_BOOSTER")) id = specialFlag + "GB_" + keyName.split("_").pop();
let user = new BDFDB.DiscordObjects.User({flags: userFlag, id: id});
wrappers.push(this.createBadges(user, null, "settings"));
}

View File

@ -2,7 +2,7 @@
* @name Translator
* @author DevilBro
* @authorId 278543574059057154
* @version 2.3.5
* @version 2.3.6
* @description Allows you to translate Messages and your outgoing Messages within Discord
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "Translator",
"author": "DevilBro",
"version": "2.3.5",
"version": "2.3.6",
"description": "Allows you to translate Messages and your outgoing Messages within Discord"
}
};
@ -326,7 +326,8 @@ module.exports = (_ => {
"sl": "slo",
"sv": "swe",
"vi": "vie",
"zh-CN": "wyw",
"zh": "wyw",
"zh-CN": "zh",
"zh-TW": "cht"
},
key: "xxxxxxxxx xxxxxx xxxxxxxxxx"
@ -400,11 +401,6 @@ module.exports = (_ => {
}
onStart () {
// REMOVE 24.09.2021
let oldAuthKeys = BDFDB.DataUtils.load(this, "authKeys");
for (let key in oldAuthKeys) if (!BDFDB.ObjectUtils.is(oldAuthKeys[key])) oldAuthKeys[key] = {key: oldAuthKeys[key]};
BDFDB.DataUtils.save(oldAuthKeys, this, "authKeys")
this.forceUpdateAll();
}