Added a bit more messages on process of downloading music

This commit is contained in:
entar 2025-05-23 06:41:31 +07:00
parent 2dcfa1cfac
commit 5f27195b6b

View File

@ -47,10 +47,12 @@ module.exports = [
connection = getVoiceConnection(ctx.guild.id)
}
const reply = await ctx.reply("Loading music data.")
// Running yt-dlp (getting music title)
const metadata = await ytDlp.getVideoInfo(link);
ctx.reply(`Playing ${metadata.title}`)
await reply.edit(`Downloading ${metadata.title}`)
// Running yt-dlp (downloading music)
const music = ytDlp.exec([
@ -64,6 +66,8 @@ module.exports = [
'--audio-format',
'mp3'
]).on('close', () => {
reply.edit(`Playing ${metadata.title}`)
// Stopping old audioplayer
if (players[ctx.guild.id]) {
players[ctx.guild.id].stop()