1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 00:10:58 -04:00

Replace forEach with for of

This commit is contained in:
toast-ts 2024-06-06 19:26:10 +10:00
parent 9533d7a514
commit 5978d33726

View File

@ -14,7 +14,7 @@ export default class MessageDelete {
{name: 'Sent at', value: `<t:${Math.round(msg.createdTimestamp/1000)}>\n<t:${Math.round(msg.createdTimestamp/1000)}:R>`}
)
const attachments:string[] = [];
msg.attachments.forEach(x=>attachments.push(x.url));
(client.channels.resolve(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [embed], files: attachments})
for (const attachment of msg.attachments.values()) attachments.push(attachment.proxyURL);
(client.channels.cache.get(client.config.dcServer.channels.bot_log) as Discord.TextChannel).send({embeds: [embed], files: attachments});
}
}