Live config for cleanup task

This commit is contained in:
2023-11-07 15:33:21 +01:00
parent f7ec430006
commit f1f8749ee8

View File

@@ -3,11 +3,11 @@ module.exports = {
immediate: true,
name: 'Cleanup tasks',
async tick(client, timer) {
const channelId = '1171410849269809232';
const channelId = '1170190197384814762';
const channel = await client.channels.fetch(channelId);
console.log(`Running cleanup task for ${channel.guild.name}/${channel.name}`);
channel.messages.fetch({ limit: 100 }).then(messages => {
console.log(`Received ${messages.size} messages`);
//Iterate through the messages here with the variable "messages".
messages.forEach(message => {
if(message.attachments.size > 0) {