Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
fix: API does not accept empty string as null after update (#519)
Browse files Browse the repository at this point in the history
* API does not accept empty string as null after update

Without this change, it is not possible to send any message with non-link buttons

* Added omitempty and removed pointer

Co-authored-by: Anders Øen Fylling <[email protected]>
  • Loading branch information
Acnologla and andersfylling authored Jan 10, 2023
1 parent 1902f90 commit dd8e29c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion message.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ type MessageComponent struct {
Label string `json:"label"`
Emoji *Emoji `json:"emoji"`
CustomID string `json:"custom_id"`
Url string `json:"url"`
Url string `json:"url,omitempty"`
Disabled bool `json:"disabled"`
Components []*MessageComponent `json:"components,omitempty"`
Options []*SelectMenuOption `json:"options,omitempty"`
Expand Down

0 comments on commit dd8e29c

Please sign in to comment.