diff --git a/src/commands/slash/Information/credits.ts b/src/commands/slash/Information/credits.ts index b97853118..15c507418 100644 --- a/src/commands/slash/Information/credits.ts +++ b/src/commands/slash/Information/credits.ts @@ -27,7 +27,8 @@ export default class Credits extends BaseCommand { { context: { userId: credit } }, )) as User[]; - const member = shardValues.find((m) => !!m) ?? (await interaction.client.users.fetch(credit)); + const member = + shardValues.find((m) => Boolean(m)) ?? (await interaction.client.users.fetch(credit)); members.push(member); } @@ -35,7 +36,8 @@ export default class Credits extends BaseCommand { const linksDivider = `${emojis.blueLine.repeat(9)} **LINKS** ${emojis.blueLine.repeat(9)}`; const creditsDivider = `${emojis.blueLine.repeat(9)} **TEAM** ${emojis.blueLine.repeat(9)}`; - const creditsEmbed = simpleEmbed(stripIndents` + const creditsEmbed = simpleEmbed( + stripIndents` ## ${emojis.wand} The Team InterChat is a project driven by a passionate team dedicated to enhancing the Discord experience. We welcome new members to join our team; if you're interested, please join our [support server](${LINKS.SUPPORT_INVITE}). @@ -57,7 +59,8 @@ export default class Credits extends BaseCommand { ${linksDivider} [Guide](${LINKS.DOCS}) • [Invite](https://discord.com/application-directory/769921109209907241) • [Support Server](${LINKS.SUPPORT_INVITE}) • [Vote](https://top.gg/bot/769921109209907241/vote) • [Privacy](${LINKS.DOCS}/legal/privacy) • [Terms](${LINKS.DOCS}/legal/terms) - `.replaceAll('_', '\\_')); + `.replaceAll('_', '\\_'), + ); const linkButtons = new ActionRowBuilder().addComponents( new ButtonBuilder() diff --git a/src/core/Client.ts b/src/core/Client.ts index d0d17e11b..fd85465aa 100644 --- a/src/core/Client.ts +++ b/src/core/Client.ts @@ -37,7 +37,7 @@ export default abstract class SuperClient extends C private readonly scheduler = new Scheduler(); - readonly description = 'The only cross-server chatting bot you\'ll ever need.'; + readonly description = "The only cross-server chatting bot you'll ever need."; readonly version = process.env.npm_package_version ?? 'Unknown'; readonly commands = commandsMap; readonly interactions = interactionsMap; @@ -117,7 +117,7 @@ export default abstract class SuperClient extends C // eslint-disable-next-line @typescript-eslint/no-explicit-any static resolveEval = (value: T[]) => - value?.find((res) => !!res) as RemoveMethods | undefined; + value?.find((res) => Boolean(res)) as RemoveMethods | undefined; /** * Fetches a guild by its ID from the cache. diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 616484874..9bca8742d 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -81,7 +81,7 @@ export const hasVoted = async (userId: Snowflake): Promise => { }) ).json(); - return !!res.voted; + return Boolean(res.voted); }; export const userVotedToday = async (userId: Snowflake): Promise => { @@ -156,8 +156,8 @@ export const disableAllComponents = ( const jsonRow = row.toJSON(); jsonRow.components.forEach((component) => { !disableLinks && - component.type === ComponentType.Button && - component.style === ButtonStyle.Link + component.type === ComponentType.Button && + component.style === ButtonStyle.Link ? (component.disabled = false) // leave link buttons enabled : (component.disabled = true); }); @@ -351,7 +351,7 @@ export const parseEmoji = (emoji: string) => { if (!match) return null; const [, animated, name, id] = match; - return { animated: !!animated, name, id }; + return { animated: Boolean(animated), name, id }; }; export const getEmojiId = (emoji: string | undefined) => {