discord-api-types APIGuildMember no permissions bit field?
Shouldn't
I'm using the "@discordjs/rest" and "discord-api-types" npm packages in my app (written in typescript) and am trying to check if a user has certain permissions, but the Type doesn't have the permission field.
Also there's basicly no examples of how to use the "@discordjs/rest" package. The only examples are here and they only show post, not get!
Simplified example of what I'm trying to do...
So, am I using the
APIGuildMember ( https://discord-api-types.dev/api/discord-api-types-v10/interface/APIGuildMember ) include permissions, just like GuildMember ( https://discord.com/developers/docs/resources/guild#guild-member-object )?I'm using the "@discordjs/rest" and "discord-api-types" npm packages in my app (written in typescript) and am trying to check if a user has certain permissions, but the Type doesn't have the permission field.
Also there's basicly no examples of how to use the "@discordjs/rest" package. The only examples are here and they only show post, not get!
Simplified example of what I'm trying to do...
rest.get() returns a Promise<unknown>, so what am I gonna do with that in typescript? If I use as APIGuildMember | null technically typescript has no problem with it, but as soon as I'm trying to use the .permission typescript's gonna cry that APIGuildMember doesn't have the property permissions.So, am I using the
rest.get() in an unsupported way, or am I just not supposed to do permission stuff with these libraries, or is APIGuildMember.permissions actually just missing accidentally and will be added?