refactor(events/guild): adding the tsconfig + eslint correction

This commit is contained in:
Raphael 2025-10-14 00:18:55 +02:00 committed by Raphaël
parent d14c847c4b
commit 6d9ee2f966

View file

@ -1,5 +1,5 @@
import { Events, Guild, EmbedBuilder, channelMention, Channel } from 'discord.js'; import { Events, Guild, EmbedBuilder, channelMention, Channel } from 'discord.js';
import { prisma } from '../../lib/prisma.ts'; import { prisma } from '@lib/prisma';
import { Guild as GuildPrisma } from '@prisma/client'; import { Guild as GuildPrisma } from '@prisma/client';
const verificationLevels: string[] = [ const verificationLevels: string[] = [
@ -29,7 +29,7 @@ export default {
const logChannel : Channel = await newGuild.client.channels const logChannel : Channel = await newGuild.client.channels
.fetch(guildData.logServer) .fetch(guildData.logServer)
.catch(() => null); .catch(() => null);
if (!logChannel || !logChannel.isTextBased()) {return;} if (!logChannel.isTextBased()) {return;}
if (oldGuild.name !== newGuild.name) { if (oldGuild.name !== newGuild.name) {
toPrint += `- Name:\n\`${oldGuild.name}\` => \`${newGuild.name}\`\n`; toPrint += `- Name:\n\`${oldGuild.name}\` => \`${newGuild.name}\`\n`;
} }
@ -55,11 +55,11 @@ export default {
toPrint += `- Filter:\n\`${oldGuild.premiumTier}\` => \`${newGuild.premiumTier}\`\n`; toPrint += `- Filter:\n\`${oldGuild.premiumTier}\` => \`${newGuild.premiumTier}\`\n`;
} }
const toRep = new EmbedBuilder() const toRep = new EmbedBuilder()
.setColor(`${guildData.color}`) .setColor(guildData.color)
.setFooter({ .setFooter({
text: guildData.footer, text: guildData.footer,
}) })
.setDescription(`${toPrint}`); .setDescription(toPrint);
logChannel.send({ logChannel.send({
embeds: [ embeds: [
toRep, toRep,