bot.on(Events.GuildAuditLogEntryCreate, async auditLog => {
console.log("Delete check")
const { action, extra: channel, executorId, targetId } = auditLog;
if ( action !== AuditLogEvent.MessageDelete ) return;
const executor = await bot.users.fetch(executorId);
const target = await bot.users.fetch(targetId);
console.log(`A message by ${target.tag} was deleted by ${executor.tag} in ${channel}.`);
});
bot.on(Events.GuildAuditLogEntryCreate, async auditLog => {
console.log("Delete check")
const { action, extra: channel, executorId, targetId } = auditLog;
if ( action !== AuditLogEvent.MessageDelete ) return;
const executor = await bot.users.fetch(executorId);
const target = await bot.users.fetch(targetId);
console.log(`A message by ${target.tag} was deleted by ${executor.tag} in ${channel}.`);
});