Update BDFDB.js
This commit is contained in:
parent
c0d337f6c4
commit
ee8d78a9c7
|
@ -9727,14 +9727,14 @@
|
||||||
"363785301195358221"
|
"363785301195358221"
|
||||||
];
|
];
|
||||||
InternalBDFDB._processAvatarRender = function (user, avatar) {
|
InternalBDFDB._processAvatarRender = function (user, avatar) {
|
||||||
if (BDFDB.ReactUtils.isValidElement(avatar) && user) {
|
if (BDFDB.ReactUtils.isValidElement(avatar) && BDFDB.ObjectUtils.is(user)) {
|
||||||
avatar.props["user_by_BDFDB"] = user.id;
|
avatar.props["user_by_BDFDB"] = user.id;
|
||||||
if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbsupporter);
|
if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbsupporter);
|
||||||
if (user.id == "278543574059057154") avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbdev);
|
if (user.id == "278543574059057154") avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbdev);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB._processAvatarMount = function (user, avatar) {
|
InternalBDFDB._processAvatarMount = function (user, avatar) {
|
||||||
if (Node.prototype.isPrototypeOf(avatar) && user) {
|
if (Node.prototype.isPrototypeOf(avatar) && BDFDB.ObjectUtils.is(user)) {
|
||||||
avatar.setAttribute("user_by_BDFDB", user.id);
|
avatar.setAttribute("user_by_BDFDB", user.id);
|
||||||
if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.bdfdbsupporter);
|
if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.bdfdbsupporter);
|
||||||
if (user.id == "278543574059057154") BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.bdfdbdev);
|
if (user.id == "278543574059057154") BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.bdfdbdev);
|
||||||
|
@ -9752,7 +9752,7 @@
|
||||||
let renderChildren = avatarWrapper.props.children;
|
let renderChildren = avatarWrapper.props.children;
|
||||||
avatarWrapper.props.children = (...args) => {
|
avatarWrapper.props.children = (...args) => {
|
||||||
let renderedChildren = renderChildren(...args);
|
let renderedChildren = renderChildren(...args);
|
||||||
InternalBDFDB._processAvatarRender(renderedChildren, e.instance.props.message.author);
|
InternalBDFDB._processAvatarRender(e.instance.props.message.author, renderedChildren);
|
||||||
return renderChildren;
|
return renderChildren;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue