Update CompleteTimestamps.plugin.js

This commit is contained in:
Mirco Wittrien 2023-01-16 18:22:40 +01:00
parent 4f7b30442d
commit 56bb18d577
1 changed files with 15 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @name CompleteTimestamps
* @author DevilBro
* @authorId 278543574059057154
* @version 1.6.4
* @version 1.6.5
* @description Replaces Timestamps with your own custom Timestamps
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -83,7 +83,8 @@ module.exports = (_ => {
after: [
"AuditLogEntry",
"Embed",
"MessageTimestamp"
"MessageTimestamp",
"UserMemberSince"
]
};
@ -209,6 +210,18 @@ module.exports = (_ => {
}
}
}
processUserMemberSince (e) {
let bodys = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutsectionbody]], all: true});
if (bodys[0]) bodys[0].props.children = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
text: this.formatTimestamp(this.settings.dates.tooltipDate, e.instance.props.userId),
children: BDFDB.ReactUtils.createElement("span", {children: bodys[0].props.children})
});
if (e.instance.props.guildMember && e.instance.props.guildMember.joinedAt && bodys[1]) bodys[1].props.children = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
text: this.formatTimestamp(this.settings.dates.tooltipDate, e.instance.props.guildMember.joinedAt),
children: BDFDB.ReactUtils.createElement("span", {children: bodys[1].props.children})
});
}
processEmbed (e) {
if (!this.settings.places.embed || !e.instance.props.embed || !e.instance.props.embed.timestamp) return;