On start playing audio event

Hello here is my code:
 const connection = joinVoiceChannel({
    channelId: voiceChannel.id,
    guildId: voiceChannel.guild.id,
    adapterCreator: voiceChannel.guild.voiceAdapterCreator,
  })
  const player = createAudioPlayer();
  const resource = createAudioResource(
    "MP3 URL",
    {
      metadata: {
        title: "A good song", // Optional object
      },
    }
  );

  player.play(resource);
  connection.subscribe(player);
player.on(AudioPlayerStatus.Playing, () => {
    console.log("Start Playing")
  
  });

but the
playing
audio event, Logs this messages twice and when the second logging was sent into the console the bot start playing the audio
Was this page helpful?