More fixes, change rest of stripObjectToScalars to configAccessibleObj

This commit is contained in:
Dark 2021-07-21 22:14:09 +02:00
parent 4ad99975de
commit acb4913495
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8
66 changed files with 623 additions and 192 deletions

View file

@ -2,7 +2,6 @@ import humanizeDuration from "humanize-duration";
import moment from "moment-timezone";
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
import { LogType } from "../../../data/LogType";
import { stripObjectToScalars } from "../../../utils";
import { CasesPlugin } from "../../Cases/CasesPlugin";
import { logsEvt } from "../types";
@ -20,7 +19,7 @@ export const LogsGuildMemberAddEvt = logsEvt({
});
pluginData.state.guildLogs.log(LogType.MEMBER_JOIN, {
member: stripObjectToScalars(member, ["user", "roles"]),
member: memberToConfigAccessibleMember(member),
new: member.user.createdTimestamp >= newThreshold ? " :new:" : "",
account_age: accountAge,
});