Open Bingonymous opened 6 days ago
Discord imposes certain restrictions when fetching user data. The request might fail if the user is not in any mutual guilds or is blocked.
Why does then the other request return the correct data. I guess its something else
Which package has the bugs?
The core library
Issue description
Stack trace: DiscordAPIError: Unauthorized at RequestHandler.execute (/app/node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js:415:13) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async RequestHandler.push (/app/node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js:63:14) at async UserManager.fetch (/app/node_modules/discord.js-selfbot-v13/src/managers/UserManager.js:98:18) at async test (/app/dist/test.js:19:22) at async /app/dist/index.js:100:18
I guess it's caused by
await bot.users.fetch(userId);
.When I run
curl -H "Authorization: token" https://discord.com/api/v9/users/xxxx/profile?with_mutual_guilds=true
on the same machine I get the expected data.Code sample
Package version
/
Node.js version
/
Operating system
Debian
Priority this issue should have
Medium (should be fixed soon)
Checklist
Additional Information
No response