feature/implement-bot-into-client-core #2

Merged
logan merged 42 commits from feature/implement-bot-into-client-core into master 2023-05-06 14:45:00 -04:00
Showing only changes of commit 999affce93 - Show all commits

View File

@@ -42,9 +42,9 @@ exports.join = async function join({interaction= undefined, guildID= undefined,
const audioInstance = await createAudioInstance(); const audioInstance = await createAudioInstance();
audioInstance.on('audio', (buffer) => { audioInstance.on('audio', (buffer) => {
buffer = Buffer.from(buffer);
log.DEBUG("Audio buffer: ", buffer); log.DEBUG("Audio buffer: ", buffer);
const encoded = encoder.encode(buffer); const encoded = encoder.encode(buffer);
log.DEBUG("Encoded packet: ", encoded);
// TODO Add a function here to check the volume of either buffer and only play audio to discord when there is audio to be played // TODO Add a function here to check the volume of either buffer and only play audio to discord when there is audio to be played
voiceConnection.playOpusPacket(encoded); voiceConnection.playOpusPacket(encoded);
}) })