const DJSVoice = require('@discordjs/voice') module.exports = { data: { name: 'play', description: 'Play a sound file (This command is under testing, so may not work)' }, async execute(interaction) { const voiceChannel = interaction.member.voice.channel if (!voiceChannel) return await interaction.reply({ content: 'You are not connected to a voice channel.', ephemeral: true }) await interaction.reply(`Joining **${voiceChannel.name}**...`) const connection = DJSVoice.joinVoiceChannel({ channelId: voiceChannel.id, guildId: voiceChannel.guild.id, adapterCreator: voiceChannel.guild.adapterCreator }) await interaction.editReply(`Joined **${voiceChannel.name}**!`) } }