1 |
import { roleMention } from '@discordjs/builders'; |
import { roleMention } from '@discordjs/builders'; |
2 |
import { GuildBan, GuildMember, Message, MessageEmbed, TextChannel, User } from 'discord.js'; |
import { FileOptions, GuildBan, GuildMember, Message, MessageEmbed, TextChannel, User } from 'discord.js'; |
3 |
import DiscordClient from '../client/Client'; |
import DiscordClient from '../client/Client'; |
4 |
import { timeProcess, timeSince } from '../utils/util'; |
import { timeProcess, timeSince } from '../utils/util'; |
5 |
|
|
65 |
text: "Deleted", |
text: "Deleted", |
66 |
}) |
}) |
67 |
.setTimestamp(); |
.setTimestamp(); |
68 |
|
|
69 |
|
const files: FileOptions[] = []; |
70 |
|
|
71 |
if (msg.attachments.size > 0) { |
if (msg.attachments.size > 0) { |
72 |
let str = ''; |
let str = ''; |
73 |
|
|
74 |
msg.attachments.forEach(a => { |
msg.attachments.forEach(a => { |
75 |
str += `**${a.name}** ${a.url}\n`; |
str += `${a.name}\n`; |
76 |
|
files.push({ |
77 |
|
name: a.name!, |
78 |
|
attachment: a.proxyURL |
79 |
|
}); |
80 |
}); |
}); |
81 |
|
|
82 |
embed.addField('Attachments', str); |
embed.addField('Attachments (top)', str); |
83 |
} |
} |
84 |
|
|
85 |
await channel.send({ |
await channel.send({ |
86 |
embeds: [ |
embeds: [ |
87 |
embed |
embed |
88 |
] |
], |
89 |
|
files |
90 |
}); |
}); |
91 |
}, msg); |
}, msg); |
92 |
} |
} |