Can't find user's voice channel!

When using member.voice.channel it returns null and I can't understand why.

export async function execute(interaction: ChatInputCommandInteraction){

    let member = await interaction.guild!.members.fetch(interaction.user.id);
    let channel = member.voice.channel;
    // null


I have the GuildVoiceStates intent and I am on a voice channel when doing the command.

discord.js version: 14.13.0
node version: 18.18.0
Was this page helpful?