mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-15 19:33:17 +00:00
Fixed ExecuteEmbed
This commit is contained in:
parent
3154333310
commit
79567a9eff
|
@ -3,6 +3,7 @@ package api
|
|||
import (
|
||||
"mime/multipart"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
|
@ -100,9 +101,9 @@ func (c *Client) ExecuteWebhook(
|
|||
webhookID discord.Snowflake, token string, wait bool,
|
||||
data ExecuteWebhookData) (*discord.Message, error) {
|
||||
|
||||
if data.Embed != nil {
|
||||
if err := data.Embed.Validate(); err != nil {
|
||||
return nil, errors.Wrap(err, "Embed error")
|
||||
for i, embed := range data.Embeds {
|
||||
if err := embed.Validate(); err != nil {
|
||||
return nil, errors.Wrap(err, "Embed error at "+strconv.Itoa(i))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue