Update OwnerTag.plugin.js
This commit is contained in:
parent
b547009b9b
commit
da2d8ea7ed
|
@ -215,6 +215,7 @@ module.exports = (_ => {
|
|||
if (e.instance.props.message && settings.addInChatWindow) {
|
||||
let userType = this.getUserType(e.instance.props.message.author, e.instance.props.message.channel_id);
|
||||
if (userType) this.injectOwnerTag(e.returnvalue.props.children, e.instance.props.message.author, userType, e.instance.props.compact ? 0 : 2, {
|
||||
channelId: e.instance.props.message.channel_id,
|
||||
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
||||
useRem: true
|
||||
});
|
||||
|
@ -264,14 +265,14 @@ module.exports = (_ => {
|
|||
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 channel = BDFDB.LibraryModules.ChannelStore.getChannel(config.channelId || BDFDB.LibraryModules.LastChannelStore.getChannelId());
|
||||
let member = channel && settings.useRoleColor ? (BDFDB.LibraryModules.MemberStore.getMember(channel.guild_id, user.id) || {}) : {};
|
||||
let tag = null;
|
||||
if (settings.useCrown) {
|
||||
let label, className;
|
||||
switch (userType) {
|
||||
case userTypes.OWNER:
|
||||
label = channel.type == BDFDB.DiscordConstants.ChannelTypes.GROUP_DM ? BDFDB.LanguageUtils.LanguageStrings.GROUP_OWNER : BDFDB.LanguageUtils.LanguageStrings.GUILD_OWNER;
|
||||
label = channel && channel.isGroupDM() ? BDFDB.LanguageUtils.LanguageStrings.GROUP_OWNER : BDFDB.LanguageUtils.LanguageStrings.GUILD_OWNER;
|
||||
className = BDFDB.disCN._ownertagownericon;
|
||||
break;
|
||||
case userTypes.ADMIN:
|
||||
|
|
Loading…
Reference in New Issue