//META{"name":"OwnerTag","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/OwnerTag","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/OwnerTag/OwnerTag.plugin.js"}*//
class OwnerTag {
getName () {return "OwnerTag";}
getVersion () {return "1.1.6";}
getAuthor () {return "DevilBro";}
getDescription () {return "Adds a Tag like Bottags to the Serverowner.";}
initConstructor () {
this.changelog = {
"fixed":[["DM Groups","Now works properly in DM Groups"]]
};
this.patchModules = {
"MemberListItem":["componentDidMount","componentDidUpdate"],
"MessageUsername":["componentDidMount","componentDidUpdate"],
"UserPopout":["componentDidMount","componentDidUpdate"],
"UserProfile":["componentDidMount","componentDidUpdate"],
"StandardSidebarView":"componentWillUnmount"
};
this.defaults = {
settings: {
addInChatWindow: {value:true, inner:true, description:"Messages"},
addInMemberList: {value:true, inner:true, description:"Member List"},
addInUserPopout: {value:true, inner:true, description:"User Popouts"},
addInUserProfil: {value:true, inner:true, description:"User Profile Modal"},
useRoleColor: {value:true, inner:false, description:"Use the Rolecolor instead of the default blue."},
useBlackFont: {value:false, inner:false, description:"Instead of darkening the Rolecolor on bright colors use black font."},
useCrown: {value:false, inner:false, description:"Use the Crown Icon instead of the OwnerTag."},
hideNativeCrown: {value:true, inner:false, description:"Hide the native Crown Icon (not the Plugin one)."},
addForAdmins: {value:false, inner:false, description:"Also add the Tag for any user with Admin rights."}
},
inputs: {
ownTagName: {value:"Owner", description:"Owner Tag Text for Owners"},
ownAdminTagName: {value:"Admin", description:"Owner Tag Text for Admins"}
}
};
}
getSettingsPanel () {
if (!global.BDFDB || typeof BDFDB != "object" || !BDFDB.loaded || !this.started) return;
var settings = BDFDB.getAllData(this, "settings");
var inputs = BDFDB.getAllData(this, "inputs");
var settingshtml = `
${this.name}
`;
for (let key in inputs) {
settingshtml += `
${this.defaults.inputs[key].description}
`;
}
for (let key in settings) {
if (!this.defaults.settings[key].inner) settingshtml += `
${this.defaults.settings[key].description}
`;
}
settingshtml += `
Add Owner Tag in:
`;
for (let key in settings) {
if (this.defaults.settings[key].inner) settingshtml += `