parent
1d9fd4a533
commit
ea374e1061
@ -1,14 +1,16 @@ |
|||||||
const Discord = require('discord.js'); |
const Discord = require('discord.js'); |
||||||
|
|
||||||
module.exports = (client, channel) => { |
module.exports = (client, channel) => { |
||||||
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 (channel.guild) { |
||||||
if (ts) {if (channel.guild.channels.cache.has(ts) && channel.guild.channels.cache.get(ts).permissionsFor(client.user.id).has("SEND_MESSAGES")) { |
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; |
||||||
channel.guild.channels.cache.get(ts).send(new Discord.MessageEmbed() |
if (ts) {if (channel.guild.channels.cache.has(ts) && channel.guild.channels.cache.get(ts).permissionsFor(client.user.id).has("SEND_MESSAGES")) { |
||||||
.setTitle("New Channel") |
channel.guild.channels.cache.get(ts).send(new Discord.MessageEmbed() |
||||||
.setDescription(`<#${channel.id}> || **#${channel.name}**${channel.parent && channel.parent.name ? `\nCategory: **${channel.parent.name}**` : ''}`) |
.setTitle("New Channel") |
||||||
.setColor('936b30') |
.setDescription(`<#${channel.id}> || **#${channel.name}**${channel.parent && channel.parent.name ? `\nCategory: **${channel.parent.name}**` : ''}`) |
||||||
.setFooter("Natsuki", client.user.avatarURL()) |
.setColor('936b30') |
||||||
.setTimestamp() |
.setFooter("Natsuki", client.user.avatarURL()) |
||||||
); |
.setTimestamp() |
||||||
}} |
); |
||||||
|
}} |
||||||
|
} |
||||||
}; |
}; |
Loading…
Reference in new issue