Property 'voice' does not exist on type 'GuildMember | APIInteractionGuildMember'.
Hi, how can I make this typesafe?
I'm getting the error in the title
Property 'voice' does not exist on type 'GuildMember | APIInteractionGuildMember'.
4 Replies
- 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!:method: ChatInputCommandInteraction#inCachedGuild()
@14.16.3
Indicates whether this interaction is received from a cached guild.is there a better way to accessing the current user's voice channel active members?
as it says cached, how can i make sure this is updated data?
I have google quite a lot regarding this but can't seem to find the best solution
The guild should always be cached
Keep Guilds intent enabled (d.js is pretty much useless w/o this). And don’t intentionally uncache guilds and channels