Skip to content

Commit

Permalink
fix: fix NaN error when id is converted to integer, close #54 (#55)
Browse files Browse the repository at this point in the history
Co-authored-by: Shigma <[email protected]>
  • Loading branch information
IMurKuroMI and shigma authored Nov 13, 2024
1 parent 79828b0 commit 775e6ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 775e6ee

Please sign in to comment.