forked from Supositware/Haha-Yes
Updated description
This commit is contained in:
parent
c092aacda2
commit
557fb214ca
1 changed files with 14 additions and 14 deletions
|
@ -19,20 +19,20 @@ module.exports = class MusicCommand extends Command {
|
|||
|
||||
run(message, { ytblink }) {
|
||||
const { voiceChannel } = message.member;
|
||||
|
||||
if (!voiceChannel) {
|
||||
return message.reply('please join a voice channel first!');
|
||||
if (!voiceChannel) {
|
||||
return message.reply('please join a voice channel first!');
|
||||
}
|
||||
|
||||
if (ytblink == 'stop') {
|
||||
voiceChannel.leave()
|
||||
} else
|
||||
voiceChannel.join().then(connection => {
|
||||
const stream = ytdl(ytblink, { filter: 'audioonly' });
|
||||
const dispatcher = connection.playStream(stream);
|
||||
|
||||
|
||||
dispatcher.on('end', () => voiceChannel.leave());
|
||||
});
|
||||
}
|
||||
|
||||
if (ytblink == 'stop') {
|
||||
voiceChannel.leave()
|
||||
} else
|
||||
voiceChannel.join().then(connection => {
|
||||
const stream = ytdl(ytblink, { filter: 'audioonly' });
|
||||
const dispatcher = connection.playStream(stream);
|
||||
|
||||
|
||||
dispatcher.on('end', () => voiceChannel.leave());
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue