not playing audio

const { joinVoiceChannel, createAudioResource, createAudioPlayer } = require("@discordjs/voice");

const connection = joinVoiceChannel({
channelId: state.channel.id,
guildId: state.guild.id,
adapterCreator: state.guild.voiceAdapterCreator
});

const player = createAudioPlayer();
connection.subscribe(player);

const resource = createAudioResource("../../effect.mp3");
player.play(resource);
const { joinVoiceChannel, createAudioResource, createAudioPlayer } = require("@discordjs/voice");

const connection = joinVoiceChannel({
channelId: state.channel.id,
guildId: state.guild.id,
adapterCreator: state.guild.voiceAdapterCreator
});

const player = createAudioPlayer();
connection.subscribe(player);

const resource = createAudioResource("../../effect.mp3");
player.play(resource);
why does this not play anything?
3 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP3y ago
no errors, joins vc fine, doesn't play audio node -v is 18.12.0
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server