summary refs log tree commit diff
path: root/util/src/entities/User.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/entities/User.ts')
-rw-r--r--util/src/entities/User.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts
index bdf0d35f..03cb3af4 100644
--- a/util/src/entities/User.ts
+++ b/util/src/entities/User.ts
@@ -29,8 +29,8 @@ export class User extends BaseClass {
 	setDiscriminator(val: string) {
 		const number = Number(val);
 		if (isNaN(number)) throw new Error("invalid discriminator");
-		if (number > 0 && number < 10000) throw new Error("discriminator must be between 1 and 9999");
-		this.discriminator = val;
+		if (number <= 0 || number > 10000) throw new Error("discriminator must be between 1 and 9999");
+		this.discriminator = val.toString();
 	}
 
 	@Column()