Update join command
- Listening to the correct event - Removed erroneous .start()
This commit is contained in:
@@ -41,7 +41,7 @@ export default async function join({interaction= undefined, guildID= undefined,
|
||||
|
||||
const audioInstance = await createAudioInstance();
|
||||
|
||||
audioInstance.on('data', buffer => {
|
||||
audioInstance.on('audio', (buffer) => {
|
||||
buffer = Buffer.from(buffer);
|
||||
const encoded = encoder.encode(buffer);
|
||||
// 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
|
||||
@@ -53,7 +53,5 @@ export default async function join({interaction= undefined, guildID= undefined,
|
||||
audioInstance.quit();
|
||||
})
|
||||
|
||||
audioInstance.start();
|
||||
|
||||
if (guildID && callback) callback();
|
||||
}
|
||||
Reference in New Issue
Block a user