Member Guild Permissions via API

Is there a reason the discord-api-types package does not contain any of the optional values returned by the Discord API? I am trying to use permissions off a guild member, but my typescript is throwing a fit because the package does not include permissions on the type. Discord documentation has permissions as optional.
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 toolkit4mo 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!
Bark
Bark4mo ago
this is a discordjs maintained package so im hoping some people are versed on it
Bark
Bark4mo ago
discord-api-types documentation
discord-api-types - Imagine typings
discord-api-types is a simple Node/Deno module that brings up to date typings for Discord's API
No description
Bark
Bark4mo ago
discord's official documentation has permissions as optional mostly curious why the discord-api-types package has absolutely no optional values in it didnt see the subtype makes more sense now that I look at how it's split up well now im curious as to how I'm supposed to get a member's overall permissions via api administrator, manage server, etc. essentially trying to check if a user can make certain changes to the server itself in the sense that I need to limit a user's access to certain features if they aren't an administrator and from outside of a bot, just using the bot's credentials it's for a website independent of the bot user logs in with oauth, site pulls certain guild details through the bot's credentials, then needs to determine what the user has access to the site then makes configuration changes everything works aside from figuring out what guild-level permissions the user has I still need to be able to pull it through the id, not solely oauth the server I was doing that before and wanted to avoid relying on the bot being online, but I'll look into the role stuff I've got a way to mimic a user for debugging, but that only works when the server doesn't need oauth everything is id based rather than oauth server validates it off the actual logged in user it mimics certain access, not the entire site as far as the server is concerened, your actual permission to make requests is based on the logged in user the mimicing only changes what the frontend displays and behaves as ive got full perms so it behaves like I'm logged in as someone else in terms of what I can see