seyfert 3.2.7-dev-18548516169.0 → 3.2.7-dev-18548786613.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -86,11 +86,20 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
|
|
|
86
86
|
poll: poll ? (poll instanceof builders_1.PollBuilder ? poll.toJSON() : poll) : undefined,
|
|
87
87
|
};
|
|
88
88
|
if (Array.isArray(body.attachments)) {
|
|
89
|
-
payload.attachments =
|
|
90
|
-
|
|
89
|
+
payload.attachments = body.attachments.map((x, i) => {
|
|
90
|
+
if (x instanceof builders_1.Attachment) {
|
|
91
|
+
return {
|
|
92
|
+
id: x.id ?? i.toString(),
|
|
93
|
+
title: x.title,
|
|
94
|
+
description: x.description,
|
|
95
|
+
filename: x.filename,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
91
99
|
id: x.id ?? i.toString(),
|
|
92
100
|
...(0, builders_1.resolveAttachment)(x),
|
|
93
|
-
}
|
|
101
|
+
};
|
|
102
|
+
});
|
|
94
103
|
}
|
|
95
104
|
else if (files?.length) {
|
|
96
105
|
payload.attachments = files?.map(({ filename }, i) => ({
|
|
@@ -531,13 +540,12 @@ let ModalSubmitInteraction = class ModalSubmitInteraction extends BaseInteractio
|
|
|
531
540
|
if (attachments) {
|
|
532
541
|
return Object.values(attachments).map(x => new builders_1.Attachment(this.client, {
|
|
533
542
|
...x,
|
|
534
|
-
proxy_url: x.url
|
|
543
|
+
proxy_url: x.url,
|
|
535
544
|
}));
|
|
536
545
|
}
|
|
537
546
|
}
|
|
538
547
|
return undefined;
|
|
539
548
|
}
|
|
540
|
-
;
|
|
541
549
|
isModal() {
|
|
542
550
|
return true;
|
|
543
551
|
}
|
|
@@ -217,7 +217,12 @@ class MessagesMethods extends DiscordBase_1.DiscordBase {
|
|
|
217
217
|
payload.attachments =
|
|
218
218
|
body.attachments?.map((x, i) => {
|
|
219
219
|
if (x instanceof builders_1.Attachment) {
|
|
220
|
-
return
|
|
220
|
+
return {
|
|
221
|
+
id: x.id,
|
|
222
|
+
title: x.title,
|
|
223
|
+
description: x.description,
|
|
224
|
+
filename: x.filename,
|
|
225
|
+
};
|
|
221
226
|
}
|
|
222
227
|
return {
|
|
223
228
|
id: i.toString(),
|