Skip to content

Commit

Permalink
now shut up for real staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Apr 19, 2022
1 parent 6975201 commit a5f1891
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions discord/message_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ func (MessageCreate) interactionCallbackData() {}
// ToBody returns the MessageCreate ready for body
func (m MessageCreate) ToBody() (any, error) {
if len(m.Files) > 0 {
mc := m
mc.Attachments = parseAttachments(mc.Files)
return PayloadWithFiles(mc, mc.Files...)
m.Attachments = parseAttachments(m.Files)
return PayloadWithFiles(m, m.Files...)
}
return m, nil
}

func (m MessageCreate) ToResponseBody(response InteractionResponse) (any, error) {
if len(m.Files) > 0 {
m.Attachments = parseAttachments(m.Files)
response.Data = m
return PayloadWithFiles(response, m.Files...)
}
return response, nil
Expand Down

0 comments on commit a5f1891

Please sign in to comment.