Commit a73482e8 authored by Aiden Buis's avatar Aiden Buis

remove voice folder and place the audio files in the main dir

parent 1f6c7c49
......@@ -24,7 +24,7 @@ const bot = new telegramBot(token, {polling: true});
bot.on('voice', (msg) => {
console.log("voice message received");
console.log("Voice message received");
var file_id = msg.voice.file_id;
var fileName = file_id;
......@@ -37,7 +37,7 @@ bot.on('voice', (msg) => {
var file_path = result.file_path;
var voice_url = `https://api.telegram.org/file/bot${token}/${file_path}`
var downloadFilePath = `voice/${fileName}.oga`;
var downloadFilePath = `${fileName}.oga`;
download(voice_url, fileName, downloadFilePath, function(err){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment