File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
packages/discord.js/src/structures Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -200,12 +200,10 @@ class MessagePayload {
200200
201201 // Only passable during edits
202202 if ( Array . isArray ( this . options . attachments ) ) {
203- this . options . attachments = this . options . attachments
203+ attachments . push (
204204 // Note how we don't check for file body encodable, since we aren't expecting file data here
205- . map ( attachment => ( isJSONEncodable ( attachment ) ? attachment . toJSON ( ) : attachment ) )
206- . concat ( attachments ?? [ ] ) ;
207- } else {
208- this . options . attachments = attachments ;
205+ ...this . options . attachments . map ( attachment => ( isJSONEncodable ( attachment ) ? attachment . toJSON ( ) : attachment ) ) ,
206+ ) ;
209207 }
210208
211209 let poll ;
@@ -242,7 +240,7 @@ class MessagePayload {
242240 : allowedMentions ,
243241 flags,
244242 message_reference,
245- attachments : this . options . attachments ,
243+ attachments,
246244 sticker_ids : this . options . stickers ?. map ( sticker => sticker . id ?? sticker ) ,
247245 thread_name : threadName ,
248246 applied_tags : appliedTags ,
You can’t perform that action at this time.
0 commit comments