Browse Source

Fix guild error

master
Abheek Dhawan 4 years ago
parent
commit
2d039fe71d
  1. 4
      index.js

4
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);

Loading…
Cancel
Save