From 822b2e0bbc4b16b1d02cc17538edeadd6b3a1f81 Mon Sep 17 00:00:00 2001 From: Luca Hentschel Date: Sun, 9 Nov 2025 21:27:42 +0100 Subject: [PATCH] fix(typings): replace 'type-guard' with 'type guard' This corrects the spacing in the term across multiple locations for consistency with standard TypeScript terminology. --- utils/v10.ts | 28 ++++++++++++++-------------- utils/v8.ts | 16 ++++++++-------- utils/v9.ts | 26 +++++++++++++------------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/utils/v10.ts b/utils/v10.ts index b8de55e2..fba9efd9 100644 --- a/utils/v10.ts +++ b/utils/v10.ts @@ -22,7 +22,7 @@ import { ApplicationCommandType, ButtonStyle, ComponentType, InteractionType } f // Interactions /** - * A type-guard check for DM interactions + * A type guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel @@ -32,7 +32,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API } /** - * A type-guard check for guild interactions + * A type guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild @@ -44,7 +44,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is // ApplicationCommandInteractions /** - * A type-guard check for DM application command interactions + * A type guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel @@ -56,7 +56,7 @@ export function isApplicationCommandDMInteraction( } /** - * A type-guard check for guild application command interactions + * A type guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild @@ -70,7 +70,7 @@ export function isApplicationCommandGuildInteraction( // MessageComponentInteractions /** - * A type-guard check for DM message component interactions + * A type guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel @@ -82,7 +82,7 @@ export function isMessageComponentDMInteraction( } /** - * A type-guard check for guild message component interactions + * A type guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild @@ -96,7 +96,7 @@ export function isMessageComponentGuildInteraction( // Buttons /** - * A type-guard check for buttons that have a `url` attached to them. + * A type guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it @@ -106,7 +106,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut } /** - * A type-guard check for buttons that have a `custom_id` attached to them. + * A type guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it @@ -118,7 +118,7 @@ export function isInteractionButton(component: APIButtonComponent): component is // Modal /** - * A type-guard check for modals submit interactions + * A type guard check for modals submit interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a modal submission @@ -132,7 +132,7 @@ export function isModalSubmitInteraction( // Message Components /** - * A type-guard check for message component interactions + * A type guard check for message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a message component @@ -144,7 +144,7 @@ export function isMessageComponentInteraction( } /** - * A type-guard check for button message component interactions + * A type guard check for button message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a button @@ -156,7 +156,7 @@ export function isMessageComponentButtonInteraction( } /** - * A type-guard check for select menu message component interactions + * A type guard check for select menu message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a select menu @@ -176,7 +176,7 @@ export function isMessageComponentSelectMenuInteraction( // Application Commands /** - * A type-guard check for chat input application commands. + * A type guard check for chat input application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a chat input application command @@ -188,7 +188,7 @@ export function isChatInputApplicationCommandInteraction( } /** - * A type-guard check for context menu application commands. + * A type guard check for context menu application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a context menu application command diff --git a/utils/v8.ts b/utils/v8.ts index 32500108..2502e134 100644 --- a/utils/v8.ts +++ b/utils/v8.ts @@ -17,7 +17,7 @@ import { ButtonStyle } from '../payloads/v8/index'; // Interactions /** - * A type-guard check for DM interactions + * A type guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel @@ -28,7 +28,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API } /** - * A type-guard check for guild interactions + * A type guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild @@ -41,7 +41,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is // ApplicationCommandInteractions /** - * A type-guard check for DM application command interactions + * A type guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel @@ -54,7 +54,7 @@ export function isApplicationCommandDMInteraction( } /** - * A type-guard check for guild application command interactions + * A type guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild @@ -69,7 +69,7 @@ export function isApplicationCommandGuildInteraction( // MessageComponentInteractions /** - * A type-guard check for DM message component interactions + * A type guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel @@ -82,7 +82,7 @@ export function isMessageComponentDMInteraction( } /** - * A type-guard check for guild message component interactions + * A type guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild @@ -97,7 +97,7 @@ export function isMessageComponentGuildInteraction( // Buttons /** - * A type-guard check for buttons that have a `url` attached to them. + * A type guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it @@ -108,7 +108,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut } /** - * A type-guard check for buttons that have a `custom_id` attached to them. + * A type guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it diff --git a/utils/v9.ts b/utils/v9.ts index b21003ef..7303f925 100644 --- a/utils/v9.ts +++ b/utils/v9.ts @@ -21,7 +21,7 @@ import { ApplicationCommandType, ButtonStyle, ComponentType, InteractionType } f // Interactions /** - * A type-guard check for DM interactions + * A type guard check for DM interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a DM channel @@ -31,7 +31,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API } /** - * A type-guard check for guild interactions + * A type guard check for guild interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction was received in a guild @@ -43,7 +43,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is // ApplicationCommandInteractions /** - * A type-guard check for DM application command interactions + * A type guard check for DM application command interactions * * @param interaction - The application command interaction to check against * @returns A boolean that indicates if the application command interaction was received in a DM channel @@ -55,7 +55,7 @@ export function isApplicationCommandDMInteraction( } /** - * A type-guard check for guild application command interactions + * A type guard check for guild application command interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the application command interaction was received in a guild @@ -69,7 +69,7 @@ export function isApplicationCommandGuildInteraction( // MessageComponentInteractions /** - * A type-guard check for DM message component interactions + * A type guard check for DM message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component interaction was received in a DM channel @@ -81,7 +81,7 @@ export function isMessageComponentDMInteraction( } /** - * A type-guard check for guild message component interactions + * A type guard check for guild message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the message component interaction was received in a guild @@ -95,7 +95,7 @@ export function isMessageComponentGuildInteraction( // Buttons /** - * A type-guard check for buttons that have a `url` attached to them. + * A type guard check for buttons that have a `url` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `url` attached to it @@ -105,7 +105,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut } /** - * A type-guard check for buttons that have a `custom_id` attached to them. + * A type guard check for buttons that have a `custom_id` attached to them. * * @param component - The button to check against * @returns A boolean that indicates if the button has a `custom_id` attached to it @@ -117,7 +117,7 @@ export function isInteractionButton(component: APIButtonComponent): component is // Message Components /** - * A type-guard check for message component interactions + * A type guard check for message component interactions * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a message component @@ -129,7 +129,7 @@ export function isMessageComponentInteraction( } /** - * A type-guard check for button message component interactions + * A type guard check for button message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a button @@ -141,7 +141,7 @@ export function isMessageComponentButtonInteraction( } /** - * A type-guard check for select menu message component interactions + * A type guard check for select menu message component interactions * * @param interaction - The message component interaction to check against * @returns A boolean that indicates if the message component is a select menu @@ -161,7 +161,7 @@ export function isMessageComponentSelectMenuInteraction( // Application Commands /** - * A type-guard check for chat input application commands. + * A type guard check for chat input application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a chat input application command @@ -173,7 +173,7 @@ export function isChatInputApplicationCommandInteraction( } /** - * A type-guard check for context menu application commands. + * A type guard check for context menu application commands. * * @param interaction - The interaction to check against * @returns A boolean that indicates if the interaction is a context menu application command