mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Added websocket voice state watching
Now emits voiceJoin(user, voice_channel) or voiceLeave(user, voice_channel) and adds/removes from voice_channel.speaking when a user joins or leaves a voice channel.
This commit is contained in:
@@ -13,6 +13,14 @@ client.on("autoRevive", () => {
|
||||
console.log("auto revived");
|
||||
});
|
||||
|
||||
client.on("voiceJoin", (user, channel) => {
|
||||
console.log(`VOICE ${user.username} joined ${channel}!`);
|
||||
});
|
||||
|
||||
client.on("voiceLeave", (user, channel) => {
|
||||
console.log(`VOICE ${user.username} left ${channel}!`);
|
||||
});
|
||||
|
||||
client.on("message", msg => {
|
||||
|
||||
if(!msg.sender.equals(client.user))
|
||||
|
||||
Reference in New Issue
Block a user