From a5f18915e6d81fc692cecd535059795080a3f934 Mon Sep 17 00:00:00 2001 From: TopiSenpai Date: Tue, 19 Apr 2022 10:29:53 +0200 Subject: [PATCH] now shut up for real staticcheck --- discord/message_create.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/discord/message_create.go b/discord/message_create.go index 529273a4..fb1031d2 100644 --- a/discord/message_create.go +++ b/discord/message_create.go @@ -24,9 +24,8 @@ 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 } @@ -34,6 +33,7 @@ func (m MessageCreate) ToBody() (any, error) { 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