importante push

master
Kit Kasune 3 years ago
parent 1d9fd4a533
commit ea374e1061
  1. 2
      events/channelCreate.js

@ -1,6 +1,7 @@
const Discord = require('discord.js'); const Discord = require('discord.js');
module.exports = (client, channel) => { module.exports = (client, channel) => {
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; 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")) { if (ts) {if (channel.guild.channels.cache.has(ts) && channel.guild.channels.cache.get(ts).permissionsFor(client.user.id).has("SEND_MESSAGES")) {
channel.guild.channels.cache.get(ts).send(new Discord.MessageEmbed() channel.guild.channels.cache.get(ts).send(new Discord.MessageEmbed()
@ -11,4 +12,5 @@ module.exports = (client, channel) => {
.setTimestamp() .setTimestamp()
); );
}} }}
}
}; };
Loading…
Cancel
Save