diff --git a/src/structure/components/observers/GuildLogging.js b/src/structure/components/observers/GuildLogging.js index 401e1cc..b59c146 100644 --- a/src/structure/components/observers/GuildLogging.js +++ b/src/structure/components/observers/GuildLogging.js @@ -720,14 +720,16 @@ class GuildLogger extends Observer { _replaceTags(text, member) { const { user, guild } = member; + const now = Date.now(); return text .replace(/\{mention\}/gu, `<@${member.id}>`) .replace(/\{tag\}/gu, Util.escapeMarkdown(user.tag)) - .replace(/\{username\}/gu, Util.escapeMarkdown(user.username)) + .replace(/\{user(name)?\}/gu, Util.escapeMarkdown(user.username)) .replace(/\{guildsize\}/gu, guild.memberCount) .replace(/\{guildname\}/gu, guild.name) - .replace(/\{accage\}/gu, Util.humanise((Date.now() - user.createdTimestamp)/1000)) //.replace(/a/, '1') + .replace(/\{accage\}/gu, Util.humanise((now - user.createdTimestamp)/1000)) //.replace(/a/, '1') .replace(/\{id\}/gu, user.id) + .replace(/\{memberfor\}/gu, Util.humanise(Math.floor((now - member.joinedTimestamp)/1000))) .trim(); }