TS - Typing issue with ModalSubmitInteraction.member

Argument of type 'GuildMember | APIInteractionGuildMember' is not assignable to parameter of type 'GuildMember'.
Argument of type 'GuildMember | APIInteractionGuildMember' is not assignable to parameter of type 'GuildMember'.
I am trying to get the GuildMember from a ModalSubmitInteraction - how would I resolve this error?
4 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
oxi
oxi2y ago
d.js 14.02 -node 16.10.0
Squid
Squid2y ago
You can receive API data if you receive the interaction through http interactions if you don't have the bot scope (which means your app isn't a member of the guild) Unless you expect that to happen, you can use the <BaseInteraction>.inCachedGuild() typeguard to ensure that you're in a cached guild and therefore will receive the full structures
oxi
oxi2y ago
thanks for the help