diff options
| author | 8cy <[email protected]> | 2020-04-07 10:38:48 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-07 10:38:48 -0700 |
| commit | 1885ab12c73c7a79a2e7d1a8055f9bd2b0a7f71b (patch) | |
| tree | 67f050cc81dea4b9b21f0d0349ecbdb263ecf221 /commands/abee.js | |
| parent | port all the stuff from app.js to commands/ (diff) | |
| download | s5nical-1885ab12c73c7a79a2e7d1a8055f9bd2b0a7f71b.tar.xz s5nical-1885ab12c73c7a79a2e7d1a8055f9bd2b0a7f71b.zip | |
final test push before master
Diffstat (limited to 'commands/abee.js')
| -rw-r--r-- | commands/abee.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/commands/abee.js b/commands/abee.js index c665b12..f46a06b 100644 --- a/commands/abee.js +++ b/commands/abee.js @@ -1,11 +1,15 @@ +const ytdl = require('ytdl-core'); + module.exports = { name: 'abee', - aliases: ['a-bee'], description: '', - async execute(msg) { + async execute(msg, args, bot) { if (msg.member.voiceChannel && !msg.guild.voiceConnection) { const connection = await msg.member.voiceChannel.join(); - const dispatcher = connection.playFile('./assets/audio/mario_on_a_bike.mp3', { + const stream = ytdl('https://www.youtube.com/watch?v=lvdnhWhQBdo', { + filter: 'audioonly' + }); + const dispatcher = connection.playStream(stream, { volume: 0.5 }); @@ -18,4 +22,4 @@ module.exports = { msg.reply('you need to join a voice channel first silly'); } } -}
\ No newline at end of file +};
\ No newline at end of file |