const ytdl = require('ytdl-core'); const voice_check_dialog = require('../utils/voice_check_dialog.js'); module.exports = { name: 'psycho', description: '', async execute(msg, args, bot) { if (msg.member.voiceChannel && !msg.guild.voiceConnection) { const connection = await msg.member.voiceChannel.join(); const stream = ytdl('https://www.youtube.com/watch?v=fnd_HSmAODs', { filter: 'audioonly' }); const dispatcher = connection.playStream(stream, { volume: 0.5 }); dispatcher.on('end', () => { msg.member.voiceChannel.leave(); }); } else { voice_check_dialog.execute(msg); } } };