No sound ( no green circle)

Hello, i followed the official discord js v14 voice guide and my bot is not playing any sound. No green circle too. Here's the code:

const { SlashCommandBuilder } = require('@discordjs/builders');
const { joinVoiceChannel, createAudioPlayer, createAudioResource, AudioPlayerStatus, VoiceConnectionStatus, NoSubscriberBehavior  } = require('@discordjs/voice');
const fs = require('fs');
const { generateDependencyReport } = require('@discordjs/voice');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('play')
        .setDescription('Play audio in your voice channel'),
    async execute(interaction) {

        const connection = joinVoiceChannel({
            channelId: interaction.member.voice.channel.id,
            guildId: interaction.guild.id,
            adapterCreator: interaction.guild.voiceAdapterCreator,
            selfDeaf: false
        });

        connection.on('stateChange', (oldState, newState) => {
            console.log(`Connection transitioned from ${oldState.status} to ${newState.status}`);
        });
        

        connection.on(VoiceConnectionStatus.Disconnected, async (oldState, newState) => {
            try {
                await Promise.race([
                    entersState(connection, VoiceConnectionStatus.Signalling, 5_000),
                    entersState(connection, VoiceConnectionStatus.Connecting, 5_000),
                ]);
                // Seems to be reconnecting to a new channel - ignore disconnect
            } catch (error) {
                // Seems to be a real disconnect which SHOULDN'T be recovered from
                connection.destroy();
            }
        });


        const player = createAudioPlayer({
            behaviors: {
                noSubscriber: NoSubscriberBehavior.Pause,
            },
        });

        player.on('stateChange', (oldState, newState) => {
            console.log(`Audio player transitioned from ${oldState.status} to ${newState.status}`);
        });

        const resource = createAudioResource('../../sound.mp3');

        player.play(resource);

        const subscription = connection.subscribe(player);

        if (subscription) {

            setTimeout(() => subscription.unsubscribe(), 5_000);
        }

        interaction.reply("Now playing")
        
    },
};

Here's the generateDependencyReport:
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.17.0
- prism-media: 1.3.5
Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: not found
Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.13
- tweetnacl: not found
FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/ 
- libopus: yes
--------------------------------------------------
Was this page helpful?