How do I get premium_type of a user or is there no way in discord.js?

I looked in the docs, but couldn't find anything. The user is not partial and fully fetched. I tested it with curl and it is accessible without 0Auth2 https://discord.com/developers/docs/resources/user#user-object-user-structure https://discord.com/developers/docs/resources/user#user-object-premium-types
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
4 Replies
d.js toolkit
d.js toolkit12mo ago
- 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! - Marked as resolved by staff
souji
souji12mo ago
as this is not yet documented by discord, we are not exposing this in discord.js you will have to make a direct rest request to fetch the raw api data for a given user from "/users/:id" you can use the client.rest.get function to make that call and handle rate limits etc. appropriately (note that fetching users from /users/ is not meant to be a bulk operation and is heavily rate limited)
monbrey
monbrey12mo ago
It used to be OAuth2 only
Want results from more Discord servers?
Add your server