Skip to content

Commit

Permalink
fix(MessageEdit): added safeguard based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyOplachko committed Jan 13, 2024
1 parent 8fc1ad7 commit 207ef92
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions restapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -1803,13 +1803,13 @@ func (s *Session) ChannelMessageEditComplex(m *MessageEdit, options ...RequestOp
return
}
}

for _, embed := range *m.Embeds {
if embed.Type == "" {
embed.Type = "rich"
if m.Embeds != nil {
for _, embed := range *m.Embeds {
if embed.Type == "" {
embed.Type = "rich"
}
}
}

endpoint := EndpointChannelMessage(m.Channel, m.ID)

var response []byte
Expand Down

0 comments on commit 207ef92

Please sign in to comment.