Skip to content
Advertisement

TypeError: client.voice.createBroadcast is not a function

This is my code:

JavaScript

Output comes out with an error:

JavaScript

I am using Node:17.0.0 and Discord.js:13.1.0

I am not sure why I am getting this error.

Advertisement

Answer

Discord.js v13 no longer supports voice. The new way to join a VC and play audio is with the @discordjs/voice library.

JavaScript

Unfortunately, discord-tts might be deprecated. You can record your own user client speaking the message and save it to an audio file. Then you can create an audio resource like this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement