summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-22 17:33:41 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-22 17:33:41 +0100
commite8943897324674c030f81a7404b779c9449286b4 (patch)
treede5fee254787117342b8e3e61628c8d2ec917c83 /src/util
parent:art: restructed guilds (diff)
downloadserver-e8943897324674c030f81a7404b779c9449286b4.tar.xz
:sparkles: [Member] pagination
Diffstat (limited to 'src/util')
-rw-r--r--src/util/instanceOf.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/instanceOf.ts b/src/util/instanceOf.ts

index cc373ec1..be7124d4 100644 --- a/src/util/instanceOf.ts +++ b/src/util/instanceOf.ts
@@ -51,7 +51,9 @@ export class Length { constructor(public type: any, public min: number, public max: number) {} check(value: string) { - return value.length >= this.min && value.length <= this.max; + if (typeof value === "string") return value.length >= this.min && value.length <= this.max; + if (typeof value === "number" || typeof value === "bigint") return value >= this.min && value <= this.max; + return false; } }