From 775e6ee241e3f6cdd9bece2d870d88023a2a6495 Mon Sep 17 00:00:00 2001 From: IMurK Date: Thu, 14 Nov 2024 00:52:31 +0800 Subject: [PATCH] fix: fix NaN error when id is converted to integer, close #54 (#55) Co-authored-by: Shigma --- src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index 714e41f..6940ced 100644 --- a/src/types.ts +++ b/src/types.ts @@ -582,7 +582,7 @@ export class Internal { for (const key in fixedArg) { if (!name.includes('guild') && key.endsWith('_id')) { const value = +fixedArg[key] - if (BigInt(Math.abs(value)) < 1n << 32n) { + if (Math.abs(value) < 4294967296) { fixedArg[key] = value } }