From 6c84ab4f37ca2e6b04c2fcf95661935c979fe217 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Wed, 31 Jul 2024 23:39:36 -0600 Subject: [PATCH] Move that --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1ca313b..9750f62 100644 --- a/index.js +++ b/index.js @@ -110,7 +110,7 @@ function sendVerificationCode(account) { console.error(err); } else if (row) { // Send verification code to phone number - runCommand(`flite -t "Hello. This is an automated call from KCA SecuriNet Monitoring. Your verification code is ${row.verification_code}. Repeating, your code is ${row.verification_code}. Once again, your code is ${row.verification_code}" -o /tmp/${account}-code.wav`).then((output) => { + runCommand(`flite -t "Hello. This is an automated call from KCA SecuriNet Monitoring. Your verification code is ${row.verification_code.split("").join(", ")}. Repeating, your code is ${row.verification_code}. Once again, your code is ${row.verification_code}" -o /tmp/${account}-code.wav`).then((output) => { runCommand(`ffmpeg -y -i /tmp/${account}-code.wav -ar 8000 -ac 1 -c:a pcm_s16le /tmp/${account}-verification.wav`).then(() => { runCommand(`rm /tmp/${account}-code.wav`) // strip extension from filename @@ -129,7 +129,7 @@ function sendVerificationCode(account) { function generatePhoneCode() { // generate 6 digit - return Math.floor(100000 + Math.random() * 900000).toString().split("").join(", "); + return Math.floor(100000 + Math.random() * 900000).toString(); } client.on("ready", async () => {