[fix debug] cache implementation

This commit is contained in:
Phil 2022-02-15 17:01:20 +01:00
commit e11c5eeabe

View file

@ -6,7 +6,8 @@ const errHander = (err) => { console.error('ERROR:', err); };
// Deletes all messages in every channel, if its deleted in one
module.exports.run = async (guild) => {
guild.channels.forEach(async (channel) => {
console.log(guild);
guild.channels.cache.forEach(async (channel) => {
if (!channel.type !== 'text') return;
const channelID = channel.id;
const checkedChannel = await BridgedChannel.findOne({ attributes: ['channelID'], where: { channelID } }).catch(errHander);