mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-21 02:40:08 +00:00
fix(typings): replace 'type-guard' with 'type guard'
This corrects the spacing in the term across multiple locations for consistency with standard TypeScript terminology.
This commit is contained in:
28
utils/v10.ts
28
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
|
||||
|
||||
16
utils/v8.ts
16
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
|
||||
|
||||
26
utils/v9.ts
26
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
|
||||
|
||||
Reference in New Issue
Block a user