diff --git a/commands/broadcast.js b/commands/broadcast.js index b7728e9..c7b9c80 100644 --- a/commands/broadcast.js +++ b/commands/broadcast.js @@ -33,6 +33,7 @@ module.exports.run = async (interaction) => { const channels = await getChannels(); channels.forEach(async (postChannel) => { const channel = client.channels.cache.get(postChannel.logChannelID); + if (!channel) return console.log(`${postChannel.logChannelID} doesn't exist.`); let errCreateWebhook = false; const channelWebhooks = await channel.fetchWebhooks().catch((err) => { errCreateWebhook = true;