mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-10 01:08:07 +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 normalizedName = name.normalize("NFKC").replace(/^[!$#@%^`&*()]+/, "");
|
||||
|
||||
if (name !== normalizedName) {
|
||||
silently(member.edit({
|
||||
nick: normalizedName,
|
||||
reason: "lame username"
|
||||
}));
|
||||
}
|
||||
if (name === normalizedName) return;
|
||||
|
||||
silently(member.edit({
|
||||
nick: normalizedName,
|
||||
reason: "lame username"
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue