saiteja-madha / discord-js-bot

🤖 Multipurpose discord bot built using discord.js v14 with moderation, music, ticketing, translation, and much more
https://strangedocs.hostz.me
Apache License 2.0
672 stars 689 forks source link

Dashboard error user_id #326

Open AC1Studios opened 1 year ago

AC1Studios commented 1 year ago

Unhandled exception: Invalid Form Body user_id[NUMBER_TYPE_COERCE]: Value "null" is not snowflake.

this is the error I'm getting image

AC1Studios commented 1 year ago

any help on fixing this?

AC1Studios commented 1 year ago

I added this code and definitely has an issue trying to retrieve the user.id if (!userData || !userData.id) { throw new Error("Invalid user data: missing user ID"); }

saiteja-madha commented 1 year ago

Unhandled exception: Invalid Form Body user_id[NUMBER_TYPE_COERCE]: Value "null" is not snowflake.

this is the error I'm getting image

Could you share the error logs from "/logs" folder

AC1Studios commented 1 year ago

It doesn't even log the errors except for the console. I can be more specific about what's going on. After authorizing the discord bot to log in to the dashboard, my user or anyone it throws this error ERROR: Unhandled exception: Invalid Form Body user_id[NUMBER_TYPE_COERCE]: Value "null" is not snowflake. It looks like the userData.id is null, causing this error. I need help figuring out how to fix this. Cause with this error it doesn't redirect the web to the /selector