Skip to content

Commit

Permalink
fix(goal): fix bug with server join
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Jan 29, 2024
1 parent 495dbb0 commit 9d09f06
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/scripts/guilds/goals.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { APIEmbed, Guild, resolveColor } from 'discord.js';
import { colors, mascotEmojis } from '../../utils/Constants.js';
import { getOrdinalSuffix } from '../../utils/Utils.js';

/**
* @param channelId must be a channel ID in the support server
Expand All @@ -13,7 +12,6 @@ export function logGuildJoin(guild: Guild, channelId: string) {
if (goalChannel?.isTextBased()) {
const count = (await client.cluster.fetchClientValues('guilds.cache.size')) as number[];
const guildCount = count.reduce((p, n) => p + n, 0);
const ordinalSuffix = getOrdinalSuffix(guildCount);

const goalEmbed: APIEmbed = {
color: ctx.color,
Expand All @@ -25,7 +23,7 @@ export function logGuildJoin(guild: Guild, channelId: string) {

// send message to support server notifying of new guild
await goalChannel.send({
content: `${ctx.flushedEmoji} I've just joined ${ctx.guild.name}, making it my **${guildCount}${ordinalSuffix}** guild! 🎉`,
content: `${ctx.flushedEmoji} I've just joined ${ctx.guild.name}, now in a total of **${guildCount}** servers! 🎉`,
embeds: [goalEmbed],
});
}
Expand Down

0 comments on commit 9d09f06

Please sign in to comment.