Update OwnerTag.plugin.js

This commit is contained in:
Mirco Wittrien 2020-09-01 10:13:24 +02:00
parent 4a65c185b4
commit 52e6a459e8
1 changed files with 2 additions and 2 deletions

View File

@ -254,14 +254,14 @@ var OwnerTag = (_ => {
injectOwnerTag (children, user, userType, insertIndex, config = {}) {
if (!BDFDB.ArrayUtils.is(children) || !user) return;
if (!settings.useCrown || settings.hideNativeCrown) {
if (settings.useCrown || settings.hideNativeCrown) {
let [_, index] = BDFDB.ReactUtils.findParent(children, {props: [["text",[BDFDB.LanguageUtils.LanguageStrings.GROUP_OWNER, BDFDB.LanguageUtils.LanguageStrings.GUILD_OWNER]]]});
if (index > -1) children[index] = null;
}
let channel = BDFDB.LibraryModules.ChannelStore.getChannel(BDFDB.LibraryModules.LastChannelStore.getChannelId());
let member = settings.useRoleColor ? (BDFDB.LibraryModules.MemberStore.getMember(channel.guild_id, user.id) || {}) : {};
let tag = null;
if (!settings.useCrown) {
if (settings.useCrown) {
let label, className;
switch (userType) {
case userTypes.OWNER: