module.exports = {
name: Events.ChannelUpdate,
on: true,
async execute(oldChannel, newChannel, client){
const guild = client.guilds.cache.get(newChannel.guildId)
if (!guild) return;
if (newChannel.type == ChannelType.DM || newChannel.type == ChannelType.GroupDM) return;
const auditLogs = await guild.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.ChannelUpdate
});
--> const auditLog = auditLogs.entries.first()
module.exports = {
name: Events.ChannelUpdate,
on: true,
async execute(oldChannel, newChannel, client){
const guild = client.guilds.cache.get(newChannel.guildId)
if (!guild) return;
if (newChannel.type == ChannelType.DM || newChannel.type == ChannelType.GroupDM) return;
const auditLogs = await guild.fetchAuditLogs({
limit: 1,
type: AuditLogEvent.ChannelUpdate
});
--> const auditLog = auditLogs.entries.first()