Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kn-lim committed Oct 30, 2023
1 parent 1171b5b commit 52c18eb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/discord/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,20 @@ func SendDeferredMessageWithComponents(appID string, token string, content strin
Type: int(discordgo.ActionsRowComponent),
Components: buttons,
}

log.Printf("Message: %v", message)
}

payload, err := json.Marshal(message)
if err != nil {
return fmt.Errorf("couldn't marshal JSON: %v", err)
}

log.Printf("Payload: %v", payload)

temp, _ := json.Marshal(map[string]string{
"content": "test",
})
log.Printf("Correct Payload: %v", temp)

url := fmt.Sprintf("%v/v%v/webhooks/%v/%v", config.url, os.Getenv("DISCORD_API_VERSION"), appID, token)
// log.Printf("Discord API URL: %s", url)

Expand Down

0 comments on commit 52c18eb

Please sign in to comment.