mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
Minor fixes
This commit is contained in:
10
lib/index.js
10
lib/index.js
@@ -31,7 +31,9 @@ a.on("message", function (m) {
|
||||
var channel = _ref;
|
||||
|
||||
if (channel instanceof VoiceChannel) {
|
||||
a.internal.joinVoiceChannel(channel)["catch"](error);
|
||||
a.joinVoiceChannel(channel)["catch"](error).then(function (connection) {
|
||||
connection.playFile("C:/users/amish/desktop/asdf.mp3");
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -58,14 +60,14 @@ a.on("message", function (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