More rework progress, mostly done up to ModActions

This commit is contained in:
Dark 2021-06-01 04:33:02 +02:00
parent 52839cc9f3
commit 57893e7f76
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
38 changed files with 199 additions and 241 deletions

View file

@ -13,14 +13,14 @@ export const LogsGuildMemberAddEvt = logsEvt({
const member = meta.args.member;
const newThreshold = moment.utc().valueOf() - 1000 * 60 * 60;
const accountAge = humanizeDuration(moment.utc().valueOf() - member.createdAt, {
const accountAge = humanizeDuration(moment.utc().valueOf() - member.user.createdTimestamp, {
largest: 2,
round: true,
});
pluginData.state.guildLogs.log(LogType.MEMBER_JOIN, {
member: stripObjectToScalars(member, ["user", "roles"]),
new: member.createdAt >= newThreshold ? " :new:" : "",
new: member.user.createdTimestamp >= newThreshold ? " :new:" : "",
account_age: accountAge,
});