File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ func (b *MessageUpdateBuilder) RemoveFile(i int) *MessageUpdateBuilder {
177
177
// RetainAttachments removes all Attachment(s) from this Message except the ones provided
178
178
func (b * MessageUpdateBuilder ) RetainAttachments (attachments ... Attachment ) * MessageUpdateBuilder {
179
179
if b .Attachments == nil {
180
- b .Attachments = new ( []AttachmentUpdate )
180
+ b .Attachments = & []AttachmentUpdate {}
181
181
}
182
182
for _ , attachment := range attachments {
183
183
* b .Attachments = append (* b .Attachments , AttachmentKeep {ID : attachment .ID })
@@ -188,7 +188,7 @@ func (b *MessageUpdateBuilder) RetainAttachments(attachments ...Attachment) *Mes
188
188
// RetainAttachmentsByID removes all Attachment(s) from this Message except the ones provided
189
189
func (b * MessageUpdateBuilder ) RetainAttachmentsByID (attachmentIDs ... snowflake.ID ) * MessageUpdateBuilder {
190
190
if b .Attachments == nil {
191
- b .Attachments = new ( []AttachmentUpdate )
191
+ b .Attachments = & []AttachmentUpdate {}
192
192
}
193
193
for _ , attachmentID := range attachmentIDs {
194
194
* b .Attachments = append (* b .Attachments , AttachmentKeep {ID : attachmentID })
You can’t perform that action at this time.
0 commit comments