CleanupMessages: Handle missing permissions for local testing
This commit is contained in:
@@ -22,7 +22,9 @@ module.exports = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (let i = 0; i < channelConfigs.length; i++) {
|
for (let i = 0; i < channelConfigs.length; i++) {
|
||||||
|
try {
|
||||||
const config = channelConfigs[i];
|
const config = channelConfigs[i];
|
||||||
const channel = await client.channels.fetch(config.channelId);
|
const channel = await client.channels.fetch(config.channelId);
|
||||||
|
|
||||||
@@ -50,6 +52,9 @@ module.exports = {
|
|||||||
message.delete();
|
message.delete();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log(`[CLEANUP] Failed for ${channelConfigs[i].channelId}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user