Adding another element to this to detect when someone stops speaking
This commit is contained in:
1 parent
a294b8c668
commit
00b834c40b
1 file changed
+4
@@ -139,6 +139,10 @@ client.on(Events.VoiceStateUpdate, async (oldState, newState) => {
|
||||
.pipe(fs.createWriteStream(media_voice_folder + path.sep + newCallID + path.sep + `${Date.now()}-${user_id}.ogg`))
|
||||
|
||||
})
|
||||
|
||||
receiver.speaking.on("end", (user_id) => {
|
||||
console.log(`User ${user_id} stopped speaking`)
|
||||
})
|
||||
} catch (error) {
|
||||
console.warn(error)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user