Skip to content

Commit

Permalink
feat(components): added comment to MessageComponentFromJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
FedorLap2006 authored and SmoothieNoIce committed Feb 17, 2022
1 parent f9b3fff commit 4044188
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components.go
Expand Up @@ -51,6 +51,7 @@ func (umc *unmarshalableMessageComponent) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, umc.MessageComponent)
}

// MessageComponentFromJSON is a helper function for unmarshaling message components
func MessageComponentFromJSON(b []byte) (MessageComponent, error) {
var u unmarshalableMessageComponent
err := u.UnmarshalJSON(b)
Expand Down

0 comments on commit 4044188

Please sign in to comment.