mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-22 14:41:05 +01:00
nesting
This commit is contained in:
parent
fa4a844dcb
commit
3d090d850b
1 changed files with 6 additions and 6 deletions
|
@ -16,10 +16,10 @@ async function moderateNick(member: GuildMember) {
|
||||||
const name = member.displayName;
|
const name = member.displayName;
|
||||||
const normalizedName = name.normalize("NFKC").replace(/^[!$#@%^`&*()]+/, "");
|
const normalizedName = name.normalize("NFKC").replace(/^[!$#@%^`&*()]+/, "");
|
||||||
|
|
||||||
if (name !== normalizedName) {
|
if (name === normalizedName) return;
|
||||||
silently(member.edit({
|
|
||||||
nick: normalizedName,
|
silently(member.edit({
|
||||||
reason: "lame username"
|
nick: normalizedName,
|
||||||
}));
|
reason: "lame username"
|
||||||
}
|
}));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue