use animated loading emote

This commit is contained in:
2026-03-05 19:17:05 -05:00
parent 43c2fa2f91
commit 6fd6160edf

View File

@@ -49,7 +49,7 @@ func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, ur
// Handle progress and results asynchronously // Handle progress and results asynchronously
go func() { go func() {
_, err := s.InteractionResponseEdit(i.Interaction, &discordgo.WebhookEdit{ _, err := s.InteractionResponseEdit(i.Interaction, &discordgo.WebhookEdit{
Content: ptr(" downloading: starting..."), Content: ptr("<a:loading:1479131733910618153> downloading: starting..."),
}) })
if err != nil { if err != nil {
log.Printf("Error updating interaction: %v", err) log.Printf("Error updating interaction: %v", err)
@@ -65,7 +65,7 @@ func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, ur
var content string var content string
if prog.Phase == "post-processing" { if prog.Phase == "post-processing" {
content = "⚙️ post-processing" content = "<a:loading:1479131733910618153> post-processing"
} else { } else {
var progressStr string var progressStr string
if prog.DownloadedBytes > 0 { if prog.DownloadedBytes > 0 {
@@ -73,7 +73,7 @@ func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, ur
} else { } else {
progressStr = "starting..." progressStr = "starting..."
} }
content = fmt.Sprintf("Downloading Video: %s", progressStr) content = fmt.Sprintf("<a:loading:1479131733910618153> Downloading Video: %s", progressStr)
} }
_, err := s.InteractionResponseEdit(i.Interaction, &discordgo.WebhookEdit{ _, err := s.InteractionResponseEdit(i.Interaction, &discordgo.WebhookEdit{
@@ -85,6 +85,9 @@ func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, ur
case result := <-resultChan: case result := <-resultChan:
if result.Success { if result.Success {
_, err = s.InteractionResponseEdit(i.Interaction, &discordgo.WebhookEdit{
Content: ptr("✅ Success"),
})
_, err = s.FollowupMessageCreate(i.Interaction, false, &discordgo.WebhookParams{ _, err = s.FollowupMessageCreate(i.Interaction, false, &discordgo.WebhookParams{
Content: "📥 Video downloaded: " + result.URL, Content: "📥 Video downloaded: " + result.URL,
}) })