format final video download message

This commit is contained in:
2026-03-05 19:35:13 -05:00
parent 6fd6160edf
commit 890a0dd5c9
3 changed files with 39 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ import (
)
// startAsyncDownload initiates a download in a goroutine and handles progress updates
func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, url, videoFormatID, audioFormatID, outputDir, tempDir string) {
func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, requester, url, videoFormatID, videoFormatName, audioFormatID, audioFormatName, outputDir, tempDir string) {
progressChan := make(chan ProgressUpdate, 1)
resultChan := make(chan DownloadResult, 1)
@@ -89,7 +89,7 @@ func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, ur
Content: ptr("✅ Success"),
})
_, err = s.FollowupMessageCreate(i.Interaction, false, &discordgo.WebhookParams{
Content: "📥 Video downloaded: " + result.URL,
Content: fmt.Sprintf("## Video Downloaded \n**URL**: %s \n**Quality**: %s + %s \n**Requested By**: <@%s> \n", result.URL, videoFormatName, audioFormatName, requester),
})
if err != nil {
log.Printf("Error updating interaction: %v", err)