summary refs log tree commit diff
path: root/src/util/entities
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-17 18:45:42 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-17 18:45:42 +1100
commit77fa7ac886ac96ab02a014b64fb155250599a790 (patch)
tree27598093285dc1379d1822c0f279914372570b71 /src/util/entities
parentRemove /api/-/monitorz (diff)
downloadserver-77fa7ac886ac96ab02a014b64fb155250599a790.tar.xz
Remove bad banned words implementation
Diffstat (limited to 'src/util/entities')
-rw-r--r--src/util/entities/Member.ts6
-rw-r--r--src/util/entities/User.ts7
2 files changed, 1 insertions, 12 deletions
diff --git a/src/util/entities/Member.ts b/src/util/entities/Member.ts
index 34089af2..d0d57b26 100644
--- a/src/util/entities/Member.ts
+++ b/src/util/entities/Member.ts
@@ -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" },
-				});
 		}
 	}
 
diff --git a/src/util/entities/User.ts b/src/util/entities/User.ts
index 585bd725..7790856a 100644
--- a/src/util/entities/User.ts
+++ b/src/util/entities/User.ts
@@ -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() {