APIInteractionDataResolvedGuildMember does not have id

While fetching for member using
interaction.options.getMember('member')
it gives two types -
GuildMember|APIInteractionDataResolvedGuildMember
out of which the second one literally doesn't have member's snowflake ID

I saw this https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionDataResolvedGuildMember and confirmed that it really doesn't have
id
field

How am I supposed to fetch such a member (basically type guard the member)?

My package.json
 "dependencies": {
    "@sapphire/decorators": "^6.0.0",
    "@sapphire/discord.js-utilities": "6.0.4",
    "@sapphire/framework": "^4.2.2",
    "@sapphire/pieces": "^3.6.1",
    "@sapphire/plugin-logger": "^3.0.1",
    "@sapphire/plugin-subcommands": "^4.0.0",
    "@sapphire/utilities": "^3.11.0",
    "colorette": "^2.0.19",
    "discord-api-types": "^0.37.36",
    "discord.js": "^14.8.0",
    "firebase-admin": "^11.5.0",
    "yaspr": "^1.0.2"
  },
image.png
Was this page helpful?