mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
Fixed process removing
This commit is contained in:
15
src/index.js
15
src/index.js
@@ -20,6 +20,19 @@ a.on("message", m => {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(m.content.startsWith("$$$ stop")){
|
||||
for(var channel of m.channel.server.channels){
|
||||
if(channel instanceof VoiceChannel){
|
||||
chan = channel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(a.internal.voiceConnections[chan]){
|
||||
var connection = a.internal.voiceConnections[chan];
|
||||
connection.stopPlaying();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(m.content.startsWith("$$$")){
|
||||
var chan;
|
||||
for(var channel of m.channel.server.channels){
|
||||
@@ -30,7 +43,7 @@ a.on("message", m => {
|
||||
}
|
||||
if(a.internal.voiceConnections[chan]){
|
||||
var connection = a.internal.voiceConnections[chan];
|
||||
connection.playFile("C:/users/amish/desktop/audio.mp3");
|
||||
connection.playFile("C:/users/amish/desktop/asdf.mp3");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user