Closed crossworth closed 4 months ago
Hello, I'm testing your library, great work.
One thing that I'm having trouble with is SetMessageReaction, I get errors when using it.
SetMessageReaction
I'm able to make it work by defining a custom MarshalJSON like so:
MarshalJSON
func (rt *ReactionType) MarshalJSON() ([]byte, error) { if rt.Type == ReactionTypeTypeEmoji { return json.Marshal(rt.ReactionTypeEmoji) } if rt.Type == ReactionTypeTypeCustomEmoji { return json.Marshal(rt.ReactionTypeCustomEmoji) } return nil, fmt.Errorf("unsupported ReactionType type") }
This creates the reaction but returns one error:
error decode response result for method setMessageReaction, json: Unmarshal(non-pointer bool)
I'm not sure why.
Fixed in v1.1.2
v1.1.2
Hello, I'm testing your library, great work.
One thing that I'm having trouble with is
SetMessageReaction
, I get errors when using it.I'm able to make it work by defining a custom
MarshalJSON
like so:This creates the reaction but returns one error:
I'm not sure why.