style(events/client): editing the embed send to the buyer on guildDelete

- The embed now will take the footer
This commit is contained in:
Raphael 2025-11-25 15:16:29 +01:00 committed by Raphaël
parent 4898b19afb
commit 536b33ba64

View file

@ -2,6 +2,7 @@ import { Events, EmbedBuilder, Guild, User } from 'discord.js';
import { prisma } from '@lib/prisma';
import { Bot as BotPrisma } from '@prisma/client';
import { log } from '@lib/log';
import { client } from '@lib/client.js';
export default {
name: Events.GuildDelete,
@ -22,7 +23,7 @@ export default {
.setTitle(`${guild.client.user.username} leaved a server`)
.setColor('#cd5c5c')
.setFooter({
text: guildData.footer,
text: '© EniumTeam ~ 2025',
})
.setDescription(
`
@ -35,15 +36,15 @@ export default {
await Promise.all(
botData.buyers.map(async (buyer: User) => {
try {
const user = await guild.client.users.fetch(buyer.id);
const user = await client.users.fetch(buyer.id);
const dm = await user.createDM();
await dm.send({
embeds: [buyerNotification],
});
await new Promise((res) => setTimeout(res, 1000));
}
catch (err) {
log.warn(err, `Not able to fetch user ${buyer.id}`);
catch {
log.info(`Not able to fetch user ${buyer.id}`);
return;
}
}),