TS - Typing issue with ModalSubmitInteraction.member
I am trying to get the GuildMember from a ModalSubmitInteraction - how would I resolve this error?
4 Replies
• 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.d.js 14.02 -node 16.10.0
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 structuresthanks for the help