Closed mmirate closed 7 years ago
Thanks! Looks clean on a first glance. I will review thoroughly when I can.
zey reports that all height
, width
, and proxy_url
values cannot actually be set by the sender. Can you confirm, and if so, remove those setters?
Those setters are now removed, by amending.
Also, since this left two of the inner builder-structs with only one setter each (url
), I eliminated those two and changed the image
and thumbnail
methods to each take a &str
instead of a closure.
I am very excited to use this. Thanks for your work, @mmirate ! I have waited this for a long time. Can't wait till @SpaceManiac merges this.
Merged in 4bfe850dd2d9cf365a68ac47c31081a0e297e388. Thanks!
Though this is already closed, I think it makes sense to add more documentation for send_embed
method which clearly explains how to use it (see usage).
Add a
Discord::send_embed
method.This method takes a closure for building some contents for the "embed" field of the "Create Messages" REST endpoint. Other
send_*
methods are unaffected.A large number of new builder-pattern structs are added in order to avoid needing to either (a) publicise the underlying "Value" enum from serde, or (b) use a very large number of Option-valued method parameters.
I believe this should fix #86.