Do not know how to serialize a BigInt at JSON.stringify
Hey quick question. Ive been trying many different things but i am still getting this error:
im trying to convert PermissionsResolvable to PermissionsBitField
wondering if anyone has ever gotten this issue and knows how to fix it
structures/Command.js : https://sourceb.in/9Xe6IyRuZI
botClient.js : https://sourceb.in/HStj89SSX6
full error message : https://sourceb.in/MFgbXQV14O
12 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!node ver v20.17.0
npm list
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
This is coming from trying to deploy a bigints, just call toString on them
i have
where?
Botclient js https://sourceb.in/HStj89SSX6
ahh i see
not sure why that would happen
i usually dont use REST.put but i dont wanna keep deleting and resetting my app commands
usually i just map my commands the same way as i put in the code i sent and set them using
await this.application.commands.set(commandsToRegister);
and that works but for some reason it doesnt with rest
this
is my client btw
oh well thanks anyways ill figure smth out
its showing fine when logging it too
Welp i figured it out, i had to push my mapped commands to a new map instead of an array
then rest.put the MapThat is very odd
they're not registering now tho lmao
but no errors :waitWhat:
well I mean, I dont think it supports a Map as a data type so
Im surprised it does anything
welp a little 180 lines of code later and i can now set my slash commands in 2 ways lol