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