refactor(events/client): now using the new log system

This commit is contained in:
Raphael 2025-10-26 17:49:46 +01:00 committed by Raphaël
parent 6b62e8e24e
commit a02dfb629e
3 changed files with 31 additions and 30 deletions

View file

@ -10,11 +10,14 @@ export default {
},
});
if (guildData.logServer) {
let toPrint: string = 'The update of the guild had changes theses thing\n';
let toPrint: string =
'The update of the guild had changes theses thing\n';
const logChannel = await newGuild.client.channels
.fetch(guildData.logServer)
.catch(() => null);
if (!logChannel || !logChannel.isTextBased()) {return;}
if (!logChannel || !logChannel.isTextBased()) {
return;
}
if (oldGuild.name !== newGuild.name) {
toPrint += `- Name:\n\`${oldGuild.name}\` => \`${newGuild.name}\`\n`;
}
@ -46,9 +49,7 @@ export default {
})
.setDescription(toPrint);
logChannel.send({
embeds: [
toRep,
],
embeds: [toRep],
});
}
},