From 4044188436b1d1cb7d9d8fd9820adf58c116eab5 Mon Sep 17 00:00:00 2001 From: nitroflap Date: Wed, 16 Feb 2022 16:50:33 +0300 Subject: [PATCH] feat(components): added comment to MessageComponentFromJSON --- components.go | 1 + 1 file changed, 1 insertion(+) diff --git a/components.go b/components.go index 4537bb26a..a6716c0ef 100644 --- a/components.go +++ b/components.go @@ -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)