Move that
This commit is contained in:
parent
21d0813cf6
commit
6c84ab4f37
4
index.js
4
index.js
|
@ -110,7 +110,7 @@ function sendVerificationCode(account) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
} else if (row) {
|
} else if (row) {
|
||||||
// Send verification code to phone number
|
// 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(`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`)
|
runCommand(`rm /tmp/${account}-code.wav`)
|
||||||
// strip extension from filename
|
// strip extension from filename
|
||||||
|
@ -129,7 +129,7 @@ function sendVerificationCode(account) {
|
||||||
|
|
||||||
function generatePhoneCode() {
|
function generatePhoneCode() {
|
||||||
// generate 6 digit
|
// 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 () => {
|
client.on("ready", async () => {
|
||||||
|
|
Loading…
Reference in a new issue