added missing join msg tags

This commit is contained in:
Erik 2022-09-24 17:19:57 +03:00
parent 437be35d13
commit ea676845dc
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -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();
}