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