You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Natsuki/events/channelCreate.js

16 lines
933 B

4 years ago
const Discord = require('discord.js');
module.exports = (client, channel) => {
3 years ago
if (channel.guild) {
let ts = client.guildconfig.logs.has(channel.guild.id) && client.guildconfig.logs.get(channel.guild.id).has('ch') ? client.guildconfig.logs.get(channel.guild.id).get('ch') : null;
if (ts) {if (channel.guild.channels.cache.has(ts) && channel.guild.channels.cache.get(ts).permissionsFor(client.user.id).has("SEND_MESSAGES")) {
3 years ago
channel.guild.channels.cache.get(ts).send({embeds: [new Discord.MessageEmbed()
3 years ago
.setTitle("New Channel")
.setDescription(`<#${channel.id}> || **#${channel.name}**${channel.parent && channel.parent.name ? `\nCategory: **${channel.parent.name}**` : ''}`)
.setColor('936b30')
.setFooter({text: "Natsuki", iconURL: client.user.displayAvatarURL()})
3 years ago
.setTimestamp()
3 years ago
]});
3 years ago
}}
}
4 years ago
};