style(events/client): editing the embed send to the buyer on guildDelete
- The embed now will take the footer
This commit is contained in:
parent
4898b19afb
commit
536b33ba64
1 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue