I come once again to ask you a question, I have this bot code “discord.js v13”, I need to get the URL of the attached file and send the link right away. how can I do this? I will leave the code part below
// save file in folder 'musicas'
stream.pipe(createWriteStream(__dirname + `/musicas/${pegaid}.mp3`)).on('finish', () => {
// Sending the attachment, and its link
try {
message.channel.send({
files: [{
attachment: (__dirname + `/musicas/${musicid}.mp3`),
name: `${musicid}.mp3`
}],
});
} catch (e) {
return message.channel.send(`${message.author}, Error ao tentar converter a música!`);
}