From 8a3fe0a82e862ab7deecfcd94d6f9312214b09fa Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Thu, 8 Aug 2024 10:14:28 -0300 Subject: [PATCH] feat: message profile picture --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 024b8c1..d464080 100644 --- a/main.go +++ b/main.go @@ -39,7 +39,6 @@ func main() { var w *discordgo.Webhook if wi := slices.IndexFunc(ws, func(w *discordgo.Webhook) bool { - log.Printf(w.Name) return w.Name == fmt.Sprintf(USER_WEBHOOK_FORMAT, m.Author.ID) }); wi == -1 { w, err = s.WebhookCreate( @@ -56,8 +55,9 @@ func main() { } _, err = s.WebhookExecute(w.ID, w.Token, true, &discordgo.WebhookParams{ - Username: m.Author.GlobalName, - Content: m.Content, + Username: m.Author.GlobalName, + AvatarURL: m.Author.AvatarURL(""), + Content: m.Content, }) if err != nil { log.Printf("ERROR: failed to message using webhook for user %s: %s", m.Author.ID, err)