From ea676845dc6bfb678b8d21c2334fe0eecedc112a Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sat, 24 Sep 2022 17:19:57 +0300 Subject: [PATCH] added missing join msg tags --- src/structure/components/observers/GuildLogging.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); }