From 2d039fe71dd361ceda883f62ef4fb4f73e94730c Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 31 Mar 2021 14:35:17 -0500 Subject: [PATCH] Fix guild error --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 028a8e0..a80510f 100644 --- a/index.js +++ b/index.js @@ -45,14 +45,14 @@ client.on('messageUpdate', (originalMessage, editedMessage) => { }); client.on('channelCreate', channel => { - const editEmbed = new Discord.MessageEmbed() + const channelCreateEmbed = new Discord.MessageEmbed() .setTitle("Channel Created #️⃣") .addField("Name", channel.name) .addField("Category", channel.category) .setFooter("ID: " + channel.id) .setTimestamp() .setColor('006699'); - editedMessage.guild.channels.cache.get("826876551756513314").send(editEmbed).catch(console.error); + channel.guild.channels.cache.get("826876551756513314").send(channelCreateEmbed).catch(console.error); }); client.login(process.env.BOT_TOKEN);