From c7a8b27716d35de34a4fa5254083ff5996d7d04f Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sat, 23 Mar 2024 08:07:56 +1100 Subject: [PATCH] Using Dyno instead. --- src/events/channelUpdate.ts | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/events/channelUpdate.ts diff --git a/src/events/channelUpdate.ts b/src/events/channelUpdate.ts deleted file mode 100644 index 8b91c5f..0000000 --- a/src/events/channelUpdate.ts +++ /dev/null @@ -1,28 +0,0 @@ -import Discord from 'discord.js'; -import TClient from '../client.js'; -export default class ChannelUpdate { - static async run(_client:TClient, _oldChannel:Discord.GuildChannel, _newChannel:Discord.GuildChannel) { -/* if (!client.config.botSwitches.logs) return; - if (oldChannel.guild?.id != client.config.dcServer.id) return; - - const auditChupdate = (await newChannel.guild.fetchAuditLogs({limit: 1, type: Discord.AuditLogEvent.ChannelUpdate})).entries.first(); - if (!auditChupdate) return console.log(`Channel (${oldChannel.name}) was updated but no audit log found for this channel.`); - - const serverLog = client.channels.cache.get(client.config.dcServer.channels.server_log) as Discord.TextChannel; - const embed = new client.embed().setColor(client.config.embedColor).setFooter({text: auditChupdate.executor.displayName, iconURL: auditChupdate.executor.displayAvatarURL({size: 2048})}).setTimestamp(); - - if (auditChupdate.changes.length > 0) { - const changes = auditChupdate.changes; - const formatAudit =(auditValue:Discord.AuditLogChange)=>`${auditValue.old ??= 'None'} ➜ ${auditValue.new ??= 'None'}`; - - embed.setTitle(`\`${oldChannel.name}\` was updated`).setTimestamp(auditChupdate.createdTimestamp); - for (const change of changes) { - if (change.key === 'name') embed.addFields({name: 'Name', value: formatAudit(change), inline: true}); - if (change.key === 'topic') embed.addFields({name: 'Topic', value: formatAudit(change), inline: true}); - } - - await serverLog.send({embeds: [embed]}); - } */ - } -} -// Commented out, will be refactored later due to issues.