Remove bad banned words implementation
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
RelationId,
|
||||
} from "typeorm";
|
||||
import { Guild } from "./Guild";
|
||||
import { Config, emitEvent, BannedWords, FieldErrors } from "../util";
|
||||
import { Config, emitEvent, FieldErrors } from "../util";
|
||||
import {
|
||||
GuildCreateEvent,
|
||||
GuildDeleteEvent,
|
||||
@@ -126,10 +126,6 @@ export class Member extends BaseClassWithoutId {
|
||||
if (this.nick) {
|
||||
this.nick = this.nick.split("\n").join("");
|
||||
this.nick = this.nick.split("\t").join("");
|
||||
if (BannedWords.find(this.nick))
|
||||
throw FieldErrors({
|
||||
nick: { message: "Bad nickname", code: "INVALID_NICKNAME" },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
FieldErrors,
|
||||
Snowflake,
|
||||
trimSpecial,
|
||||
BannedWords,
|
||||
adjustEmail,
|
||||
} from "..";
|
||||
import { Member, Session } from ".";
|
||||
@@ -242,12 +241,6 @@ export class User extends BaseClass {
|
||||
});
|
||||
this.discriminator = discrim.toString().padStart(4, "0");
|
||||
}
|
||||
|
||||
if (/*!update ||*/ this.username)
|
||||
if (BannedWords.find(this.username))
|
||||
throw FieldErrors({
|
||||
username: { message: "Bad username", code: "INVALID_USERNAME" },
|
||||
});
|
||||
}
|
||||
|
||||
toPublicUser() {
|
||||
|
||||
Reference in New Issue
Block a user