Fixed process removing

This commit is contained in:
hydrabolt
2015-11-07 21:33:38 +00:00
parent 2e43117500
commit 48c3770caf
6 changed files with 73 additions and 13 deletions

View File

@@ -38,8 +38,7 @@ a.on("message", function (m) {
}
}
}
if (m.content.startsWith("$$$")) {
var chan;
if (m.content.startsWith("$$$ stop")) {
for (var _iterator2 = m.channel.server.channels, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
var _ref2;
@@ -61,7 +60,34 @@ a.on("message", function (m) {
}
if (a.internal.voiceConnections[chan]) {
var connection = a.internal.voiceConnections[chan];
connection.playFile("C:/users/amish/desktop/audio.mp3");
connection.stopPlaying();
}
return;
}
if (m.content.startsWith("$$$")) {
var chan;
for (var _iterator3 = m.channel.server.channels, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref3;
if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref3 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref3 = _i3.value;
}
var channel = _ref3;
if (channel instanceof VoiceChannel) {
chan = channel;
break;
}
}
if (a.internal.voiceConnections[chan]) {
var connection = a.internal.voiceConnections[chan];
connection.playFile("C:/users/amish/desktop/asdf.mp3");
}
}
});