Browse Source

Hard code guild ID

master
Abheek Dhawan 4 years ago
parent
commit
996e1d63b1
  1. 22
      index.js

22
index.js

@ -26,7 +26,7 @@ client.on('messageDelete', message => {
.setFooter("ID: " + message.id) .setFooter("ID: " + message.id)
.setTimestamp() .setTimestamp()
.setColor('ff0000'); .setColor('ff0000');
message.guild.channels.cache.get("826876551756513314").send(deleteEmbed).catch(console.error); client.guilds.get("826506878976000030").channels.cache.get("826876551756513314").send(deleteEmbed).catch(console.error);
}); });
client.on('messageUpdate', (originalMessage, editedMessage) => { client.on('messageUpdate', (originalMessage, editedMessage) => {
@ -41,18 +41,20 @@ client.on('messageUpdate', (originalMessage, editedMessage) => {
.setFooter("ID: " + editedMessage.id) .setFooter("ID: " + editedMessage.id)
.setTimestamp() .setTimestamp()
.setColor('006699'); .setColor('006699');
editedMessage.guild.channels.cache.get("826876551756513314").send(editEmbed).catch(console.error); client.guilds.get("826506878976000030").channels.cache.get("826876551756513314").send(editEmbed).catch(console.error);
}); });
client.on('channelCreate', channel => { client.on('channelCreate', channel => {
const channelCreateEmbed = new Discord.MessageEmbed() if (channel.guild.id = "826506878976000030") {
.setTitle("Channel Created #️⃣") const channelCreateEmbed = new Discord.MessageEmbed()
.addField("Name", channel.name) .setTitle("Channel Created #️⃣")
.addField("Category", channel.category) .addField("Name", channel.name)
.setFooter("ID: " + channel.id) .addField("Category", channel.category)
.setTimestamp() .setFooter("ID: " + channel.id)
.setColor('006699'); .setTimestamp()
channel.guild.channels.cache.get("826876551756513314").send(channelCreateEmbed).catch(console.error); .setColor('006699');
client.guilds.get("826506878976000030").channels.cache.get("826876551756513314").send(channelCreateEmbed).catch(console.error);
}
}); });
client.login(process.env.BOT_TOKEN); client.login(process.env.BOT_TOKEN);

Loading…
Cancel
Save