mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
Minor fixes
This commit is contained in:
11
src/index.js
11
src/index.js
@@ -12,7 +12,10 @@ a.on("message", m => {
|
||||
if(m.content === "&init"){
|
||||
for(var channel of m.channel.server.channels){
|
||||
if(channel instanceof VoiceChannel){
|
||||
a.internal.joinVoiceChannel(channel).catch(error);
|
||||
a.joinVoiceChannel(channel).catch(error)
|
||||
.then(connection => {
|
||||
connection.playFile("C:/users/amish/desktop/asdf.mp3");
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -26,14 +29,14 @@ a.on("message", m => {
|
||||
}
|
||||
}
|
||||
if(a.internal.voiceConnections[chan]){
|
||||
connection = a.internal.voiceConnections[chan];
|
||||
connection
|
||||
var connection = a.internal.voiceConnections[chan];
|
||||
connection.playFile("C:/users/amish/desktop/audio.mp3");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function error(e){
|
||||
console.log(e);
|
||||
console.log(e.stack);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user