Update StaffTag.plugin.js
This commit is contained in:
parent
95a3a00c9a
commit
bec28e72ab
|
@ -2,7 +2,7 @@
|
||||||
* @name StaffTag
|
* @name StaffTag
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.5.7
|
* @version 1.5.8
|
||||||
* @description Adds a Crown/Tag to Server Owners (or Admins/Management)
|
* @description Adds a Crown/Tag to Server Owners (or Admins/Management)
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -90,9 +90,11 @@ module.exports = (_ => {
|
||||||
onLoad () {
|
onLoad () {
|
||||||
|
|
||||||
this.modulePatches = {
|
this.modulePatches = {
|
||||||
|
before: [
|
||||||
|
"MessageHeader"
|
||||||
|
],
|
||||||
after: [
|
after: [
|
||||||
"MemberListItem",
|
"MemberListItem",
|
||||||
"MessageUsername",
|
|
||||||
"NameTag",
|
"NameTag",
|
||||||
"UsernameSection",
|
"UsernameSection",
|
||||||
"UserPopoutInfo",
|
"UserPopoutInfo",
|
||||||
|
@ -269,9 +271,9 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processMessageUsername (e) {
|
processMessageHeader (e) {
|
||||||
if (!e.instance.props.message || !this.settings.tagPlaces.chat) return;
|
if (!e.instance.props.message || !this.settings.tagPlaces.chat) return;
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {filter: n => n && n.props && typeof n.props.renderPopout == "function"});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.instance.props.username, {filter: n => n && n.props && typeof n.props.renderPopout == "function"});
|
||||||
if (index == -1) return;
|
if (index == -1) return;
|
||||||
const author = e.instance.props.userOverride || e.instance.props.message.author;
|
const author = e.instance.props.userOverride || e.instance.props.message.author;
|
||||||
let userType = this.getUserType(author, e.instance.props.message.channel_id);
|
let userType = this.getUserType(author, e.instance.props.message.channel_id);
|
||||||
|
|
Loading…
Reference in New Issue