diff options
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -370,6 +370,24 @@ bot.on('message', async msg => { }
}
+ if (command == 'yt-test') {
+ if (msg.member.voiceChannel && !msg.guild.voiceConnection) {
+ const connection = await msg.member.voiceChannel.join();
+ const stream = ytdl('https://www.youtube.com/watch?v=3CS93CdMv_E', { filter: 'audioonly' });
+ const dispatcher = connection.playStream(stream, {
+ volume: 0.5
+ });
+
+ dispatcher.on('end', () => {
+ msg.member.voiceChannel.leave();
+ })
+ } else if (msg.guild.voiceConnection) {
+ msg.reply('i\'m already playing that lol')
+ } else {
+ msg.reply('you need to join a voice channel first silly');
+ }
+ }
+
// Help
if (command == 'help') {
if (!args.length) {
|