File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import EmbedWrapper from './EmbedWrapper.js';
2
2
import colors from '../util/colors.js' ;
3
3
import { AttachmentBuilder , escapeMarkdown } from 'discord.js' ;
4
4
import { EMBED_DESCRIPTION_LIMIT } from '../util/apiLimits.js' ;
5
+ import got from 'got' ;
5
6
6
7
export default class MessageDeleteEmbed extends EmbedWrapper {
7
8
#files = [ ] ;
@@ -31,8 +32,8 @@ export default class MessageDeleteEmbed extends EmbedWrapper {
31
32
}
32
33
}
33
34
34
- for ( const attachment of message . attachments . values ( ) ) {
35
- this . #files. push ( new AttachmentBuilder ( attachment . attachment )
35
+ for ( /** @type { import('discord.js').Attachment } */ const attachment of message . attachments . values ( ) ) {
36
+ this . #files. push ( new AttachmentBuilder ( got . stream ( attachment . proxyURL ) )
36
37
. setDescription ( attachment . description )
37
38
. setName ( attachment . name )
38
39
. setSpoiler ( true ) ) ;
@@ -44,4 +45,4 @@ export default class MessageDeleteEmbed extends EmbedWrapper {
44
45
message . files = this . #files;
45
46
return message ;
46
47
}
47
- }
48
+ }
You can’t perform that action at this time.
0 commit comments