const connection = joinVoiceChannel({
channelId: channel.id,
guildId: interaction.guildId,
adapterCreator: channel.guild.voiceAdapterCreator,
selfDeaf: false
});
const player = createAudioPlayer({
behaviors: {noSubscriber: NoSubscriberBehavior.Pause},
});
connection.subscribe(player)
const resource = createAudioResource('music/Steps.mp3', { metadata: {channel: channel} });
player.play(resource);
interaction.editReply(`Playing ${channel.toString()}`)
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: interaction.guildId,
adapterCreator: channel.guild.voiceAdapterCreator,
selfDeaf: false
});
const player = createAudioPlayer({
behaviors: {noSubscriber: NoSubscriberBehavior.Pause},
});
connection.subscribe(player)
const resource = createAudioResource('music/Steps.mp3', { metadata: {channel: channel} });
player.play(resource);
interaction.editReply(`Playing ${channel.toString()}`)