Mine command isn't working on v12

client.on(‘voiceStateUpdate’, async (oldMember, newMember) => {
const google = require(“google-tts-api”); **
let teyitkanali = “766379519912181760”;
** let konus = [“Sunucumuza hoşgeldiniz! Kaydınızı yapması için bir yetkiliyi bekleyin!”]

** let user = client.users.get(newMember.id);**
** const konusma = konus[Math.floor(Math.random()konus.length)]; **
** let ismi = newMember.user.username;
*

** if (newMember.id !== client.user.id && newMember.voiceChannel && newMember.voiceChannel.id === teyitkanali) {**
** try {**
** await newMember.voiceChannel.join();**
** google(${ismi} ${konusma}, ‘tr’, 1).then(url => {**
** newMember.voiceChannel.join().then(connection => {**
** connection.playStream(url).on(“end”, () => {**
** connection.disconnect();**
** })**
** })**
** }) **
** async kanal => { **
** }**
** } catch (burak) { console.error(burak) };**
** };**
** });**

Can you help me?

v12 is different than v11. Read the docs to learn more.

1 Like

Are you getting any errors in the logs?